Change SmartThings APIs for Tizen 5.0 81/193681/2
authorJin Yoon <jinny.yoon@samsung.com>
Fri, 23 Nov 2018 07:22:45 +0000 (16:22 +0900)
committerJin Yoon <jinny.yoon@samsung.com>
Fri, 23 Nov 2018 17:55:01 +0000 (02:55 +0900)
Change-Id: Ia848afa3b3fdf0956a0c3282157ecae0aac069dd

20 files changed:
.cproject
.gitignore [new file with mode: 0644]
.project
inc/log.h
inc/sensor-data.h [deleted file]
inc/smartthings.h
inc/smartthings_payload.h
inc/smartthings_resource.h
lib/liboicdastack.so [deleted file]
lib/libsdkapi.so [deleted file]
lib/libst_thing_master_api.so [new file with mode: 0644]
lib/libst_thing_resource_api.so [new file with mode: 0644]
project_def.prop [changed mode: 0755->0644]
res/certificate.pem
res/privatekey.der
shared/res/master.json
shared/res/resource.json
src/controller.c
src/sensor-data.c [deleted file]
tizen-manifest.xml

index c5d1196..65556d0 100644 (file)
--- a/.cproject
+++ b/.cproject
@@ -16,7 +16,7 @@
                                </extensions>
                        </storageModule>
                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-                               <configuration artifactName="motion" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1684968043" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug">
+                               <configuration artifactName="smart-light" buildArtefactType="org.tizen.nativecore.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecore.buildArtefactType.app,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1684968043" name="Debug" parent="org.tizen.nativecore.config.sbi.gcc45.app.debug">
                                        <folderInfo id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1684968043." name="/" resourcePath="">
                                                <toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug.401771083" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.debug">
                                                        <targetPlatform id="org.tizen.nativeide.target.sbi.gnu.platform.base.10790367" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
@@ -28,7 +28,7 @@
                                                                <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.1001060053" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="gnu.cpp.compiler.option.dialect.std.1328601870" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="false" valueType="enumerated"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.752658663" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" useByScannerDiscovery="false" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="iot-headless-5.0-device.core_llvm40.armel"/>
+                                                                       <listOptionValue builtIn="false" value="iot-headed-5.0-device.core_llvm40.armel"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks.core.1317601758" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.core" useByScannerDiscovery="false" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="osp"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/csr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device-certificate-manager&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ector-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotjs&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.core.1068841642" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.core" useByScannerDiscovery="false" valueType="stringList">
                                                                <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.25875162" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="gnu.c.compiler.option.dialect.std.1231802084" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="false" valueType="enumerated"/>
                                                                <option id="sbi.gnu.c.compiler.option.1129862963" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" useByScannerDiscovery="false" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="iot-headless-5.0-device.core_llvm40.armel"/>
+                                                                       <listOptionValue builtIn="false" value="iot-headed-5.0-device.core_llvm40.armel"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks.core.1715324858" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.core" useByScannerDiscovery="false" valueType="userObjs">
                                                                        <listOptionValue builtIn="false" value="osp"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/csr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device-certificate-manager&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ector-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotjs&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_cflags.core.2122567201" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.core" useByScannerDiscovery="false" valueType="stringList">
                                        </folderInfo>
                                        <sourceEntries>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="shared"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
                                        </sourceEntries>
                                                                <option defaultValue="gnu.cpp.compiler.debugging.level.none" id="sbi.gnu.cpp.compiler.option.debugging.level.core.1710555417" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.44092032" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.cpp.compiler.option.415554586" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="iot-headless-5.0-device.core_llvm40.armel"/>
+                                                                       <listOptionValue builtIn="false" value="iot-headed-5.0-device.core_llvm40.armel"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1881040319" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/csr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device-certificate-manager&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ector-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotjs&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.core.919896027" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.core" valueType="stringList">
                                                                <option defaultValue="gnu.c.debugging.level.none" id="sbi.gnu.c.compiler.option.debugging.level.core.8066054" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" valueType="enumerated"/>
                                                                <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.1612101856" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" valueType="boolean"/>
                                                                <option id="sbi.gnu.c.compiler.option.765401613" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
-                                                                       <listOptionValue builtIn="false" value="iot-headless-5.0-device.core_llvm40.armel"/>
+                                                                       <listOptionValue builtIn="false" value="iot-headed-5.0-device.core_llvm40.armel"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1310261364" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" valueType="includePath">
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/libxml2&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appcore-agent&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/appfw&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/asp/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/attach-panel&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/badge&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/base&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cairo&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/calendar-service2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/cbhm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/chromium-ewk&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ckm&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/contacts-svc&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/context-service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/csr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dali-toolkit&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dbus-1.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/device-certificate-manager&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/dlog&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-buffer-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-con-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-file-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-imf-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-input-evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ecore-ipc-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ector-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/edje-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efl-extension&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/efreet-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eina-1/eina&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eio-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/elementary-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/embryo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/emile-1&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eo-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/eom&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ethumb-client-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/evas-1&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/feedback&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/fontconfig&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/freetype2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/geofence&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/gio-unix-2.0&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/glib-2.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/harfbuzz&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotcon&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/iotjs&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/json-glib-1.0&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/location&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/maps&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/media-content&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/messaging&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/metadata-editor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minicontrol&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/minizip&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/network&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/notification&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/nsd/&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/phonenumber-utils&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/privacy-privilege-manager/&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/rpc-port&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/SDL2&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/sensor&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/shortcut&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/storage&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/system&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tef&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/tzsh&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/ui-viewmgr&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/vulkan&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/web&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_service&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_dali&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/widget_viewer_evas&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/wifi-direct&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/include/yaca&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/dbus-1.0/include&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${SBI_SYSROOT}/usr/lib/glib-2.0/include&quot;"/>
                                                                </option>
                                                                <option id="sbi.gnu.c.compiler.option.frameworks_cflags.core.240608328" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.core" valueType="stringList">
                                        </folderInfo>
                                        <sourceEntries>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
-                                               <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="shared"/>
                                                <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
                                        </sourceEntries>
diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..61124d7
--- /dev/null
@@ -0,0 +1,7 @@
+/Debug/
+/SA_Report/
+/.sign/
+/res/certificate.pem
+/res/privatekey.der
+/crash-info/
+/.package-stamp
index 5e5b0cf..af28b71 100644 (file)
--- a/.project
+++ b/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-       <name>motion-cp</name>
+       <name>smart-light</name>
        <comment></comment>
        <projects>
        </projects>
index c911278..eb89231 100644 (file)
--- a/inc/log.h
+++ b/inc/log.h
@@ -15,8 +15,8 @@
  * limitations under the License.
  *
  ******************************************************************/
-#ifndef __CO2_LOG_H__
-#define  __CO2_LOG_H__
+#ifndef __LOG_H__
+#define  __LOG_H__
 
 #include <dlog.h>
 
@@ -93,5 +93,5 @@ extern "C" {
 }
 #endif
 
-#endif /* __CO2_LOG_H__ */
+#endif /* __LOG_H__ */
 
diff --git a/inc/sensor-data.h b/inc/sensor-data.h
deleted file mode 100644 (file)
index f486551..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* ****************************************************************
- *
- * Copyright 2017 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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_DATA_H__
-#define  __SENSOR_DATA_H__
-
-#include <stdbool.h>
-
-typedef enum {
-       SENSOR_DATA_TYPE_NONE = 0,
-       SENSOR_DATA_TYPE_INT,
-       SENSOR_DATA_TYPE_UINT,
-       SENSOR_DATA_TYPE_BOOL,
-       SENSOR_DATA_TYPE_DOUBLE,
-       SENSOR_DATA_TYPE_STR,
-} sensor_data_type_e;
-
-typedef struct __sensor_data_s sensor_data;
-
-sensor_data *sensor_data_new(sensor_data_type_e type);
-void sensor_data_free(sensor_data *data);
-
-int sensor_data_set_int(sensor_data *data, int value);
-int sensor_data_set_uint(sensor_data *data, unsigned int value);
-int sensor_data_set_bool(sensor_data *data, bool value);
-int sensor_data_set_double(sensor_data *data, double value);
-int sensor_data_set_string(sensor_data *data, const char *value, unsigned int size);
-
-sensor_data_type_e sensor_data_get_type(sensor_data *data);
-int sensor_data_get_int(sensor_data *data, int *value);
-int sensor_data_get_uint(sensor_data *data, unsigned int *value);
-int sensor_data_get_bool(sensor_data *data, bool *value);
-int sensor_data_get_double(sensor_data *data, double *value);
-int sensor_data_get_string(sensor_data *data, const char **value);
-
-#endif /* __SENSOR_DATA_H__ */
-
index f1b6edc..7206479 100644 (file)
@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+/*****************************************************************
+ *
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -8,11 +9,13 @@
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
+ * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT 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 __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_H__
 #define __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_H__
@@ -163,16 +166,11 @@ typedef struct smartthings_ap_list_s *smartthings_ap_list_h;
 
 /**
  * @brief Callback for status of connection to SmartThings Thing agent.
- * @details The following error codes can be received: \n
-       #SMARTTHINGS_ERROR_NONE:                               Success \n
-       #SMARTTHINGS_ERROR_PERMISSION_DENIED:      Permission denied \n
-       #SMARTTHINGS_ERROR_SERVICE_UNAVAILABLE:   Service unavailable \n
  * @since_ses 1
  *
  * @remarks The @a handle should not be released.
  * @remarks The @a handle is the same object for which the callback was set/added.
  * @remarks The @a handle will be released when smartthings_deinitialize() is called.
- * @remarks When callback is called, user can see result as #smartthings_error_e enumeration value.
  * @remarks When callback is called, user can see connection status as #smartthings_connection_status_e enumeration value.
  *
  * @param[in] result The result of connection operation
@@ -182,7 +180,7 @@ typedef struct smartthings_ap_list_s *smartthings_ap_list_h;
  *
  * @see smartthings_initialize()
  */
-typedef void (*smartthings_connection_status_cb)(smartthings_error_e result, smartthings_h handle, smartthings_connection_status_e status, void *user_data);
+typedef void (*smartthings_connection_status_cb)(smartthings_h handle, smartthings_connection_status_e status, void *user_data);
 
 /**
  * @brief Callback for SmartThings Thing status.
index b4612c1..988585d 100644 (file)
@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+/*****************************************************************
+ *
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -8,11 +9,13 @@
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
+ * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT 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 __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_PAYLOAD_H__
 #define __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_PAYLOAD_H__
index 962339b..1968c50 100644 (file)
@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+/*****************************************************************
+ *
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -8,11 +9,13 @@
  * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
+ * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT 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 __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_RESOURCE_H__
 #define __SAMSUNG_EXPERIENCE_SERVICE_SMARTTHINGS_RESOURCE_H__
@@ -80,16 +83,11 @@ typedef struct smartthings_resource_s *smartthings_resource_h;
 
 /**
  * @brief Callback for status of connection to SmartThings Thing agent.
-  * @details The following error codes can be received: \n
-       #SMARTTHINGS_RESOURCE_ERROR_NONE:                               Success \n
-       #SMARTTHINGS_RESOURCE_ERROR_PERMISSION_DENIED:      Permission denied \n
-       #SMARTTHINGS_RESOURCE_ERROR_SERVICE_UNAVAILABLE:   Service unavailable \n
  * @since_ses 1
  *
  * @remarks The @a handle should not be released.
  * @remarks The @a handle is the same object for which the callback was set/added.
  * @remarks The @a handle will be released when smartthings_deinitialize() is called.
- * @remarks When callback is called, user can see result as #smartthings_resource_error_e enumeration value.
  * @remarks When callback is called, user can see connection status as #smartthings_connection_status_e enumeration value.
  *
  * @param[in] result The result of connection operation
@@ -99,8 +97,7 @@ typedef struct smartthings_resource_s *smartthings_resource_h;
  *
  * @see smartthings_resource_initialize()
  */
-typedef void (*smartthings_resource_connection_status_cb)(smartthings_resource_error_e result, smartthings_resource_h handle, smartthings_resource_connection_status_e status, void *user_data);
-
+typedef void (*smartthings_resource_connection_status_cb)(smartthings_resource_h handle, smartthings_resource_connection_status_e status, void *user_data);
 
 /**
  * @brief Callback for handling request(GET/SET) messages.
diff --git a/lib/liboicdastack.so b/lib/liboicdastack.so
deleted file mode 100755 (executable)
index 4a5cc91..0000000
Binary files a/lib/liboicdastack.so and /dev/null differ
diff --git a/lib/libsdkapi.so b/lib/libsdkapi.so
deleted file mode 100755 (executable)
index 47ca354..0000000
Binary files a/lib/libsdkapi.so and /dev/null differ
diff --git a/lib/libst_thing_master_api.so b/lib/libst_thing_master_api.so
new file mode 100644 (file)
index 0000000..aef594a
Binary files /dev/null and b/lib/libst_thing_master_api.so differ
diff --git a/lib/libst_thing_resource_api.so b/lib/libst_thing_resource_api.so
new file mode 100644 (file)
index 0000000..245093f
Binary files /dev/null and b/lib/libst_thing_resource_api.so differ
old mode 100755 (executable)
new mode 100644 (file)
index 2d97874..b6a64c2
@@ -1,11 +1,11 @@
-APPNAME = motion-light-smartthings
+APPNAME = smart-light
 
 type = app
-profile = iot-headless-4.0
+profile = iot-headed-5.0
 
-USER_SRCS = src/motion-light-smartthings.c
+USER_SRCS = src/smart-light.c
 USER_DEFS =
-USER_INC_DIRS = inc, inc/sdk
+USER_INC_DIRS = inc
 USER_OBJS =
-USER_LIBS = lib/liboicdastack.so, lib/libsdkapi.so
+USER_LIBS = lib/libst_thing_master_api.so, lib/libst_thing_resource_api.so
 USER_EDCS =
index f333767..b01132a 100644 (file)
@@ -1,20 +1,20 @@
------BEGIN CERTIFICATE-----
-MIICyzCCAnGgAwIBAgIUREVWM1AwMTE1NDIxODE4NDIxMzAwCgYIKoZIzj0EAwIw
-fTE4MDYGA1UEAwwvU2Ftc3VuZyBFbGVjdHJvbmljcyBPQ0YgRGV2ZWxvcGVyIFN1
-YkNBIHYzIFRFU1QxFjAUBgNVBAsMDU9DRiBEZXYgU3ViQ0ExHDAaBgNVBAoME1Nh
-bXN1bmcgRWxlY3Ryb25pY3MxCzAJBgNVBAYTAktSMB4XDTE4MTExNDA3NTA0MloX
-DTE5MDExMzA3NTA0MlowgbQxaDBmBgNVBAMMX0RldmVsb3BlciBEZXZpY2UgVEVT
-VDogU21hcnQgQnNvbiAoMzc3YjMxZDAtNDIzZS00MTY3LThmMDEtNWQ0YWRkMThl
-ZjBhKS9ib3llb24uc29uQHNhbXN1bmcuY29tMR0wGwYDVQQLDBRPQ0YgRGV2IERl
-dmljZShmRGowKTEcMBoGA1UECgwTU2Ftc3VuZyBFbGVjdHJvbmljczELMAkGA1UE
-BhMCS1IwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARZRn213vfBUPtllqe+PIEF
-/EtXPEOsicfSyvgQlmTx6yaio2wCpLBYmyxVQRLE/wWdLOKTvVXvSfsDvICpT7o3
-o4GWMIGTMAsGA1UdDwQEAwIDyDA8BggrBgEFBQcBAQQwMC4wLAYIKwYBBQUHMAGG
-IGh0dHA6Ly9vY3NwLXRlc3Quc2Ftc3VuZ2lvdHMuY29tMDsGA1UdHwQ0MDIwMKAu
-oCyGKmh0dHA6Ly9jcmwtdGVzdC5zYW1zdW5naW90cy5jb20vZGV2M2NhLmNybDAJ
-BgNVHRMEAjAAMAoGCCqGSM49BAMCA0gAMEUCIGRUNYQgPeJbbwuOypBF5GpT6A4N
-Oi5c1EldV7EBiZfdAiEA+pjtT+aDwE980viJGnnUWJJHCdJhVty76QnBDIPEKfQ=
------END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----\r
+MIICxjCCAm2gAwIBAgIUREVWM1AwMTE1NDI5NTc2NzI1NDUwCgYIKoZIzj0EAwIw\r
+fTE4MDYGA1UEAwwvU2Ftc3VuZyBFbGVjdHJvbmljcyBPQ0YgRGV2ZWxvcGVyIFN1\r
+YkNBIHYzIFRFU1QxFjAUBgNVBAsMDU9DRiBEZXYgU3ViQ0ExHDAaBgNVBAoME1Nh\r
+bXN1bmcgRWxlY3Ryb25pY3MxCzAJBgNVBAYTAktSMB4XDTE4MTEyMzA3MjExMloX\r
+DTE5MDEyMjA3MjExMlowgbAxZDBiBgNVBAMMW0RldmVsb3BlciBEZXZpY2UgVEVT\r
+VDogU21hcnRfTGlnaHQgKDMwOTg3YzZiLTU5Y2QtNDEzMC1iMDNmLTIxNzlkN2Ni\r
+MjE0NSkvdGhlb2ppbkBuYXZlci5jb20xHTAbBgNVBAsMFE9DRiBEZXYgRGV2aWNl\r
+KGZDeTgpMRwwGgYDVQQKDBNTYW1zdW5nIEVsZWN0cm9uaWNzMQswCQYDVQQGEwJL\r
+UjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJI5RaiQANoCZuUxb6/r4SZqm+ca\r
+zKteQe+mCQVZ8sl8Ubc9s0YdouhuaeJc1GfZ3CQTAWhpQnMsz4+KRKRjxkGjgZYw\r
+gZMwCwYDVR0PBAQDAgPIMDwGCCsGAQUFBwEBBDAwLjAsBggrBgEFBQcwAYYgaHR0\r
+cDovL29jc3AtdGVzdC5zYW1zdW5naW90cy5jb20wOwYDVR0fBDQwMjAwoC6gLIYq\r
+aHR0cDovL2NybC10ZXN0LnNhbXN1bmdpb3RzLmNvbS9kZXYzY2EuY3JsMAkGA1Ud\r
+EwQCMAAwCgYIKoZIzj0EAwIDRwAwRAIgFzPB4rv4VJcrQzIz0aE5Y/U/vTifAAiy\r
+lEMP4tJNCB4CIA8RcoyorWgdCTL8ksB6yijAN2dkuCEbrM5lNivfnZC8\r
+-----END CERTIFICATE-----\r
 -----BEGIN CERTIFICATE-----
 MIIClDCCAjmgAwIBAgITCBdmNie8mlu4WgGqOB3KClKsjzAMBggqhkjOPQQDAgUA
 MHAxLTArBgNVBAMTJFNhbXN1bmcgRWxlY3Ryb25pY3MgT0NGIFJvb3QgQ0EgVEVT
index 16c4420..614b655 100644 (file)
Binary files a/res/privatekey.der and b/res/privatekey.der differ
index f225f53..7d27d0f 100644 (file)
@@ -1,16 +1,16 @@
 {
   "devices": [
     {
-      "deviceType": "x.wwst.d.basic",
-      "deviceName": "Motion",
-      "mnid": "fDj0",
-      "vid": "bson"
+      "deviceType": "oic.d.light",
+      "deviceName": "***Your Device Name***",
+      "mnid": "***Your MNID***",
+      "vid": "***Your Vendor ID***"
     }
   ],
   "configuration": {
     "easySetup": {
       "mode": 1,
-      "setupId": "000"
+      "setupId": "***Your Setup ID***"
     },
     "otm": 2,
     "crtType": 1
index 86e26f9..14d7ba5 100644 (file)
@@ -2,22 +2,22 @@
   "resources": {
     "single": [
       {
-        "uri": "/capability/switch/main/0",
+        "uri": "/capability/motionSensor/main/0",
         "types": [
-          "x.com.st.powerswitch"
+          "oic.r.sensor.motion"
         ],
         "interfaces": [
-          "oic.if.a",
+          "oic.if.s",
           "oic.if.baseline"
         ]
       },
       {
-        "uri": "/capability/motionSensor/main/0",
+        "uri": "/capability/switch/main/0",
         "types": [
-          "oic.r.sensor.motion"
+          "x.com.st.powerswitch"
         ],
         "interfaces": [
-          "oic.if.s",
+          "oic.if.a",
           "oic.if.baseline"
         ]
       }
   },
   "resourceTypes": [
     {
-      "type": "x.com.st.powerswitch",
+      "type": "oic.r.sensor.motion",
       "properties": [
         {
-          "key": "power",
-          "type": "string",
-          "readOnly": 3,
-          "mandatory": true,
+          "key": "value",
+          "type": "boolean",
+          "readOnly": 1,
+          "mandatory": false,
           "isArray": false
         }
       ]
     },
     {
-      "type": "oic.r.sensor.motion",
+      "type": "x.com.st.powerswitch",
       "properties": [
         {
-          "key": "value",
-          "type": "boolean",
-          "readOnly": 1,
-          "mandatory": false,
+          "key": "power",
+          "type": "string",
+          "readOnly": 3,
+          "mandatory": true,
           "isArray": false
         }
       ]
index 90a54d0..8c3e48d 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 #include <stdint.h>
-#include <glib.h>
+#include <Ecore.h>
 
 #include "log.h"
 #include "resource/resource_infrared_motion_sensor.h"
 #include "resource/resource_led.h"
-#include "sensor-data.h"
 
-#define LED_ON "on"
-#define LED_OFF "off"
-#define SENSOR_LED_INIT "off"
-#define SENSOR_MOTION_CH (46)
-#define SENSOR_LED_CH (130)
-#define SENSOR_GATHER_INTERVAL (50) //50ms
+// Duration for a timer
+#define TIMER_GATHER_INTERVAL (5.0f)
 
-#define USE_ST_SDK
+// Motion sensor info
+#define SENSOR_MOTION_GPIO_NUMBER (46)
 
-#ifdef USE_ST_SDK
+// LED info
+#define SENSOR_LED_GPIO_NUMBER (130)
+#define SENSOR_LED_ON "on"
+#define SENSOR_LED_OFF "off"
 
+#define USE_ST_SDK
+#ifdef USE_ST_SDK
 #include "smartthings.h"
 #include "smartthings_resource.h"
 #include "smartthings_payload.h"
 
-/*  You have to FIX IT !!!  */
-#define CERT_FILE "certificate.pem" // cert file name in 'res' directory
-#define PRIV_FILE "privatekey.der" // private key file name in 'res' directory
+// Cert file name in 'res' directory
+#define CERT_FILE "certificate.pem"
+// Private key file name in 'res' directory
+#define PRIV_FILE "privatekey.der"
 
 #define SENSOR_MOTION_URI "/capability/motionSensor/main/0"
 #define SENSOR_MOTION_KEY "value"
 #define SENSOR_LED_URI "/capability/switch/main/0"
 #define SENSOR_LED_KEY "power"
-
 #endif /* USE_ST_SDK */
 
 typedef struct app_data_s {
-       guint getter_motion;
-       sensor_data *motion_data;
-       sensor_data *led_data;
+       Ecore_Timer *getter_timer;
+       uint32_t motion_data;
+       int led_data;
 #ifdef USE_ST_SDK
        smartthings_h st_master_h;
        smartthings_resource_h st_res_h;
-       smartthings_resource_connection_status_e st_res_conn_status;
+       smartthings_status_e status;
 #endif /* USE_ST_SDK */
 } app_data;
-
 static app_data *g_ad = NULL;
 
 #ifdef USE_ST_SDK
-
-/* smartthings resource functions */
-static const char *
-__resource_error_to_str(smartthings_resource_error_e error)
+static const char * _resource_error_to_str(smartthings_resource_error_e error)
 {
        const char *err_str = NULL;
 
@@ -105,72 +102,122 @@ __resource_error_to_str(smartthings_resource_error_e error)
 
        return err_str;
 }
+#endif
 
-static int __change_led_data(void *data, char *state) {
+static Eina_Bool _get_motion_sensor_data(void *user_data)
+{
        int ret = 0;
-       app_data *ad = data;
+       uint32_t value = 0;
+       app_data *ad = user_data;
 
-       retv_if(!ad, -1);
-       retv_if(!ad->led_data, -1);
+       if (!ad) {
+               _E("failed to get app_data");
+               return ECORE_CALLBACK_CANCEL;
+       }
 
-       sensor_data_set_string(ad->led_data, state, strlen(state));
+       ret = resource_read_infrared_motion_sensor(SENSOR_MOTION_GPIO_NUMBER, &value);
+       if (ret != 0) {
+               _E("cannot read data from the infrared motion sensor");
+               return ECORE_CALLBACK_CANCEL;
+       }
+       ad->motion_data = value;
 
-       if (0 == strcmp(state, LED_ON)) {
-               ret = resource_write_led(SENSOR_LED_CH, 1);
-       } else {
-               ret = resource_write_led(SENSOR_LED_CH, 0);
+       _D("Detected motion value is: %u", value);
+
+#ifdef USE_ST_SDK
+       int error = SMARTTHINGS_RESOURCE_ERROR_NONE;
+       smartthings_payload_h resp_payload = NULL;
+
+       if (ad->status != SMARTTHINGS_STATUS_REGISTERED_TO_CLOUD)
+               return ECORE_CALLBACK_RENEW;
+
+       error = smartthings_payload_create(&resp_payload);
+       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE || !resp_payload) {
+               _E("smartthings_payload_create() failed, [%s]",
+                       _resource_error_to_str(error));
+               return ECORE_CALLBACK_CANCEL;
        }
 
-       retv_if(ret != 0, -1);
+       error = smartthings_payload_set_bool(resp_payload, SENSOR_MOTION_KEY, (bool)ad->motion_data);
+       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
+               _E("smartthings_payload_set_bool() failed, [%s]",
+                       _resource_error_to_str(error));
+
+       error = smartthings_resource_notify(ad->st_res_h, SENSOR_MOTION_URI, resp_payload);
+       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
+               _E("smartthings_resource_notify() failed, [%s]",
+                       _resource_error_to_str(error));
+
+       if (smartthings_payload_destroy(resp_payload))
+               _E("smartthings_payload_destroy() failed");
+#endif
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+static int _set_led_data(app_data *ad, int state) {
+       int ret = 0;
+
+       ad->led_data = state;
+       ret = resource_write_led(SENSOR_LED_GPIO_NUMBER, state);
+       if (ret != 0) {
+               _E("cannot write led data");
+               return -1;
+       }
+       _I("LED : %d",state);
 
        return 0;
 }
 
-static bool
-handle_get_motion(smartthings_payload_h resp_payload, void *user_data)
+#ifdef USE_ST_SDK
+/* SmartThings resource functions */
+static bool _handle_get_motion(smartthings_payload_h resp_payload, void *user_data)
 {
+       int error = SMARTTHINGS_RESOURCE_ERROR_NONE;
        app_data *ad = user_data;
-       bool value = false;
 
        retv_if(!ad, false);
 
        _D("Received a GET request for MOTION");
 
-       sensor_data_get_bool(ad->motion_data, &value);
-       smartthings_payload_set_bool(resp_payload, SENSOR_MOTION_KEY, ad->motion_data);
-
-       _D("Value : %d", value);
+       error = smartthings_payload_set_bool(resp_payload, SENSOR_MOTION_KEY, (bool)ad->motion_data);
+       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
+               _E("smartthings_payload_set_bool() failed, [%s]",
+                       _resource_error_to_str(error));
 
        return true;
 }
 
-static bool
-handle_get_led(smartthings_payload_h resp_payload, void *user_data)
+static bool _handle_get_led(smartthings_payload_h resp_payload, void *user_data)
 {
        app_data *ad = user_data;
-       const char *str = NULL;
        int error = SMARTTHINGS_RESOURCE_ERROR_NONE;
+       char *str = NULL;
 
        retv_if(!ad, false);
 
        _D("Received a GET request for LED");
 
-       error = smartthings_payload_set_string(resp_payload, SENSOR_LED_KEY, ad->led_data);
-       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
-               _E("smartthings_resource_notify() failed, [%s]",
-                       __resource_error_to_str(error));
+       if (ad->led_data)
+               str = SENSOR_LED_ON;
+       else
+               str = SENSOR_LED_OFF;
 
+       error = smartthings_payload_set_string(resp_payload, SENSOR_LED_KEY, str);
+       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
+               _E("smartthings_payload_set_string() failed, [%s]",
+                       _resource_error_to_str(error));
 
        _D("Power : %s", str);
 
        return true;
 }
 
-static bool
-handle_set_led(smartthings_payload_h payload, smartthings_payload_h resp_payload, void *user_data)
+static bool _handle_set_led(smartthings_payload_h payload, smartthings_payload_h resp_payload, void *user_data)
 {
        app_data *ad = user_data;
        char *str = NULL;
+       char *res_str = NULL;
        int ret = 0;
        int error = SMARTTHINGS_RESOURCE_ERROR_NONE;
 
@@ -178,27 +225,34 @@ handle_set_led(smartthings_payload_h payload, smartthings_payload_h resp_payload
 
     _D("Received a SET request");
 
-    smartthings_payload_get_string(payload, SENSOR_LED_KEY, &str);
+    error = smartthings_payload_get_string(payload, SENSOR_LED_KEY, &str);
        if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
-               _E("smartthings_resource_notify() failed, [%s]",
-                       __resource_error_to_str(error));
+               _E("smartthings_payload_get_string() failed, [%s]",
+                       _resource_error_to_str(error));
 
-       ret = __change_led_data(ad, strdup(str));
-
-       retv_if(ret != 0, false);
+       if (strncmp(str, SENSOR_LED_ON, strlen(SENSOR_LED_ON))) {
+               ret = _set_led_data(ad, 0);
+               res_str = SENSOR_LED_OFF;
+       } else {
+               ret = _set_led_data(ad, 1);
+               res_str = SENSOR_LED_ON;
+       }
 
        free(str);
+       if (ret != 0) {
+               _E("cannot set LED");
+               return false;
+       }
 
-       error = smartthings_payload_set_string(resp_payload, SENSOR_LED_KEY, ad->led_data);
+       error = smartthings_payload_set_string(resp_payload, SENSOR_LED_KEY, res_str);
        if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
-               _E("smartthings_resource_notify() failed, [%s]",
-                       __resource_error_to_str(error));
+               _E("smartthings_payload_set_string() failed, [%s]",
+                       _resource_error_to_str(error));
 
     return true;
 }
 
-static void
-_request_cb(smartthings_resource_h handle, int req_id,
+static void _request_cb(smartthings_resource_h handle, int req_id,
        const char *uri, smartthings_resource_req_type_e req_type,
        smartthings_payload_h payload, void *user_data)
 {
@@ -208,22 +262,21 @@ _request_cb(smartthings_resource_h handle, int req_id,
 
        _D("request on %s, type[%d], id[%d]", uri, req_type, req_id);
 
-       smartthings_payload_create(&resp_payload);
-       if (!resp_payload) {
-               _E("Response payload is NULL");
-               return;
-       }
+       error = smartthings_payload_create(&resp_payload);
+       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE || ! resp_payload)
+               _E("smartthings_payload_create() failed, [%s]",
+                       _resource_error_to_str(error));
 
        if (req_type == SMARTTHINGS_RESOURCE_REQUEST_GET) {
-               if (0 == g_strcmp0(uri, SENSOR_MOTION_URI))
-                       result = handle_get_motion(resp_payload, user_data);
-               else if (0 == g_strcmp0(uri, SENSOR_LED_URI))
-                       result = handle_get_led(resp_payload, user_data);
+               if (!strncmp(uri, SENSOR_MOTION_URI, strlen(SENSOR_MOTION_URI)))
+                       result = _handle_get_motion(resp_payload, user_data);
+               else if (!strncmp(uri, SENSOR_LED_URI, strlen(SENSOR_LED_URI)))
+                       result = _handle_get_led(resp_payload, user_data);
                else
                        _E("No matching Resource uri to get");
        } else if (req_type == SMARTTHINGS_RESOURCE_REQUEST_SET) {
-               if (0 == g_strcmp0(uri, SENSOR_LED_URI))
-                       result = handle_set_led(payload, resp_payload, user_data);
+               if (!strncmp(uri, SENSOR_LED_URI, strlen(SENSOR_LED_URI)))
+                       result = _handle_set_led(payload, resp_payload, user_data);
                else
                        _E("No matching Resource uri to get");
        } else {
@@ -234,9 +287,9 @@ _request_cb(smartthings_resource_h handle, int req_id,
 
        error = smartthings_resource_send_response(handle, req_id, uri, resp_payload, result);
        if (error != SMARTTHINGS_RESOURCE_ERROR_NONE) {
-                       smartthings_payload_destroy(resp_payload);
                        _E("smartthings_resource_send_response() failed, [%s]",
-                               __resource_error_to_str(error));
+                               _resource_error_to_str(error));
+                       smartthings_payload_destroy(resp_payload);
                        return;
        }
 
@@ -244,118 +297,38 @@ _request_cb(smartthings_resource_h handle, int req_id,
                        error = smartthings_resource_notify(handle, uri, resp_payload);
                        if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
                                _E("smartthings_resource_notify() failed, [%s]",
-                               __resource_error_to_str(error));
+                                               _resource_error_to_str(error));
        }
 
        if (smartthings_payload_destroy(resp_payload))
-               _E("smartthings_payload_destroy failed");
+               _E("smartthings_payload_destroy() failed");
 
        return;
 }
 
-static void
-_resource_connection_status_cb(smartthings_resource_error_e error,
+static void _resource_connection_status_cb(
        smartthings_resource_h handle,
        smartthings_resource_connection_status_e status, void *user_data)
 {
        app_data *ad = user_data;
 
-       _D("result [%s], status=[%d]", __resource_error_to_str(error), status);
+       _D("status=[%d]", status);
 
        ret_if(!ad);
 
-       ad->st_res_conn_status = status;
-
        if (status == SMARTTHINGS_RESOURCE_CONNECTION_STATUS_CONNECTED) {
-               if (smartthings_resource_set_request_cb(handle, _request_cb, ad)) {
+               int error = SMARTTHINGS_RESOURCE_ERROR_NONE;
+               error = smartthings_resource_set_request_cb(handle, _request_cb, ad);
+               if (error != SMARTTHINGS_RESOURCE_ERROR_NONE) {
                        _E("smartthings_resource_set_request_cb() is failed");
                        return;
                }
        } else {
                _E("connection failed");
        }
-       return;
-}
-
-static int
-st_thing_notify_resource(app_data *ad, const char *uri, const char *key, sensor_data *data)
-{
-       smartthings_resource_h handle = NULL;
-       smartthings_payload_h payload = NULL;
-       int error = SMARTTHINGS_RESOURCE_ERROR_NONE;
-       sensor_data_type_e data_type = SENSOR_DATA_TYPE_NONE;
-
-       retv_if(!ad, -1);
-       retv_if(!ad->st_res_h, -1);
-       retv_if(ad->st_res_conn_status != SMARTTHINGS_RESOURCE_CONNECTION_STATUS_CONNECTED, -1);
-       retv_if(!uri, -1);
-       retv_if(!key, -1);
-       retv_if(!data, -1);
-
-       handle = ad->st_res_h;
-
-       data_type = sensor_data_get_type(data);
-       retv_if(data_type == SENSOR_DATA_TYPE_NONE, -1);
-
-       smartthings_payload_create(&payload);
-       if (!payload) {
-               _E("failed to create payload is NULL");
-               return -1;
-       }
-
-       switch (data_type) {
-       case SENSOR_DATA_TYPE_INT:
-               {
-                       int value = 0;
-                       sensor_data_get_int(data, &value);
-                       smartthings_payload_set_int(payload, key, value);
-               }
-               break;
-       case SENSOR_DATA_TYPE_UINT:
-               {
-                       unsigned int value = 0;
-                       sensor_data_get_uint(data, &value);
-                       smartthings_payload_set_int(payload, key, (int)value);
-               }
-               break;
-       case SENSOR_DATA_TYPE_BOOL:
-               {
-                       bool value = 0;
-                       sensor_data_get_bool(data, &value);
-                       smartthings_payload_set_bool(payload, key, value);
-               }
-               break;
-       case SENSOR_DATA_TYPE_DOUBLE:
-               {
-                       double value = 0;
-                       sensor_data_get_double(data, &value);
-                       smartthings_payload_set_double(payload, key, value);
-               }
-               break;
-       case SENSOR_DATA_TYPE_STR:
-               {
-                       const char *value = NULL;
-                       sensor_data_get_string(data, &value);
-                       smartthings_payload_set_string(payload, key, value);
-               }
-               break;
-       case SENSOR_DATA_TYPE_NONE:
-       default:
-               _E("unsupport data type");
-               break;
-       }
-
-       error = smartthings_resource_notify(handle, uri, payload);
-       if (error != SMARTTHINGS_RESOURCE_ERROR_NONE)
-               _E("smartthings_resource_notify() failed, [%s]",
-                       __resource_error_to_str(error));
-
-       smartthings_payload_destroy(payload);
-
-       return 0;
 }
 
-static int st_thing_resource_init(app_data *ad)
+static int _init_resource(app_data *ad)
 {
        smartthings_resource_h st_res_h = NULL;
        int error = 0;
@@ -370,17 +343,16 @@ static int st_thing_resource_init(app_data *ad)
                                _resource_connection_status_cb, ad);
        if (error) {
                _E("smartthings_resource_initialize() is failed, [%s]",
-                       __resource_error_to_str(error));
+                       _resource_error_to_str(error));
                return -1;
        }
 
        ad->st_res_h = st_res_h;
-       ad->st_res_conn_status = SMARTTHINGS_RESOURCE_CONNECTION_STATUS_DISCONNECTED;
 
        return 0;
 }
 
-static int st_thing_resource_fini(app_data *ad)
+static int _fini_resource(app_data *ad)
 {
        retv_if(!ad, -1);
 
@@ -391,12 +363,11 @@ static int st_thing_resource_fini(app_data *ad)
        smartthings_resource_deinitialize(ad->st_res_h);
 
        ad->st_res_h = NULL;
-       ad->st_res_conn_status = SMARTTHINGS_RESOURCE_CONNECTION_STATUS_DISCONNECTED;
 
        return 0;
 }
 
-/* smartthings master functions */
+/* SmartThings master functions */
 static const char *__master_error_to_str(smartthings_error_e error)
 {
        const char *err_str = NULL;
@@ -451,19 +422,20 @@ static void _reset_result_cb(smartthings_h handle, bool result, void *user_data)
        _I("reset result = [%d]", result);
 }
 
-static void
-_thing_status_cb(
+static void _thing_status_cb(
                smartthings_h handle, smartthings_status_e status, void *user_data)
 {
+       app_data *ad = user_data;
        _D("status: [%d]", status);
+       ad->status = status;
 }
 
-static void
-_things_connection_status_cb(smartthings_error_e error,
-       smartthings_h handle, smartthings_connection_status_e status,
-       void *user_data)
+//static void _things_connection_status_cb(smartthings_error_e error,
+static void _things_connection_status_cb(
+               smartthings_h handle, smartthings_connection_status_e status,
+               void *user_data)
 {
-       _D("result [%s], status = [%d]", __master_error_to_str(error), status);
+       _D("status = [%d]", status);
 
        if (status == SMARTTHINGS_CONNECTION_STATUS_CONNECTED) {
                int err = 0;
@@ -478,7 +450,7 @@ _things_connection_status_cb(smartthings_error_e error,
                err = smartthings_set_device_property(
                                        handle, dev_name, wifi_mode, wifi_freq);
                if (err) {
-                       _E("smartthings_initialize() is failed, [%s]",
+                       _E("smartthings_set_device_property() is failed, [%s]",
                                __master_error_to_str(err));
                        return;
                }
@@ -506,12 +478,12 @@ _things_connection_status_cb(smartthings_error_e error,
 
                err = smartthings_set_reset_result_cb(handle, _reset_result_cb, NULL);
                if (err) {
-                       _E("smartthings_set_reset_confirm_cb() is failed, [%s]",
+                       _E("smartthings_set_reset_result_cb() is failed, [%s]",
                                __master_error_to_str(err));
                        return;
                }
 
-               err = smartthings_set_status_changed_cb(handle, _thing_status_cb, NULL);
+               err = smartthings_set_status_changed_cb(handle, _thing_status_cb, user_data);
                if (err) {
                        _E("smartthings_set_status_changed_callback() is failed, [%s]",
                                __master_error_to_str(err));
@@ -537,6 +509,7 @@ _things_connection_status_cb(smartthings_error_e error,
                        return;
                }
 
+               _I("Easysetup is starting now");
                err = smartthings_start_easysetup(handle);
                if (err) {
                        _E("smartthings_start_easysetup() is failed, [%s]",
@@ -547,10 +520,9 @@ _things_connection_status_cb(smartthings_error_e error,
        } else {
                        _E("connection failed");
        }
-       return;
 }
 
-static int st_thing_master_init(app_data *ad)
+static int _init_master(app_data *ad)
 {
        int err = 0;
        smartthings_h st_handle = NULL;
@@ -562,7 +534,7 @@ static int st_thing_master_init(app_data *ad)
                return 0;
        }
 
-       err = smartthings_initialize(&st_handle, _things_connection_status_cb, NULL);
+       err = smartthings_initialize(&st_handle, _things_connection_status_cb, ad);
        if (err) {
                _E("smartthings_initialize() is failed, [%s]",
                        __master_error_to_str(err));
@@ -574,7 +546,7 @@ static int st_thing_master_init(app_data *ad)
        return 0;
 }
 
-int st_thing_master_fini(app_data *ad)
+int _fini_master(app_data *ad)
 {
        retv_if(!ad, -1);
 
@@ -599,90 +571,42 @@ int st_thing_master_fini(app_data *ad)
 
        return 0;
 }
-
 #endif /* USE_ST_SDK */
 
-static gboolean __change_motion_sensor_data(gpointer user_data)
-{
-       int ret = 0;
-       uint32_t value = 0;
-
-       app_data *ad = user_data;
-
-       if (!ad) {
-               _E("failed to get app_data");
-               service_app_exit();
-               return FALSE;
-       }
-
-       if (!ad->motion_data) {
-               _E("failed to get motion_data");
-               service_app_exit();
-               ad->getter_motion = 0;
-               return FALSE;
-       }
-
-       ret = resource_read_infrared_motion_sensor(SENSOR_MOTION_CH, &value);
-       retv_if(ret != 0, TRUE);
-
-       sensor_data_set_bool(ad->motion_data, value);
-
-       _D("Detected motion value is: %d", value);
-
-#ifdef USE_ST_SDK
-               // Notify observers of the Motion sensor resource
-               st_thing_notify_resource(ad, SENSOR_MOTION_URI, SENSOR_MOTION_KEY, ad->motion_data);
-#endif
-               return FALSE;
-//     return TRUE;
-}
-
-static void gathering_stop(void *data)
+static void _stop_gathering(void *data)
 {
        app_data *ad = data;
        ret_if(!ad);
 
-       if (ad->getter_motion) {
-               g_source_remove(ad->getter_motion);
-               ad->getter_motion = 0;
+       if (ad->getter_timer) {
+               ecore_timer_del(ad->getter_timer);
+               ad->getter_timer = NULL;
        }
 }
 
-static void gathering_start(void *data)
+static void _start_gathering(void *data)
 {
        app_data *ad = data;
        ret_if(!ad);
 
-       ad->getter_motion = g_timeout_add(SENSOR_GATHER_INTERVAL, __change_motion_sensor_data, ad);
+       if (ad->getter_timer)
+               ecore_timer_del(ad->getter_timer);
 
-       if (!ad->getter_motion)
-               _E("Failed to add getter_motion");
+       ad->getter_timer = ecore_timer_add(TIMER_GATHER_INTERVAL, _get_motion_sensor_data, ad);
+       if (!ad->getter_timer)
+               _E("Failed to add a timer");
 }
 
 static bool service_app_create(void *user_data)
 {
+#ifdef USE_ST_SDK
        app_data *ad = user_data;
 
-       // Declare new sensor data for Motion data
-       ad->motion_data = sensor_data_new(SENSOR_DATA_TYPE_BOOL);
-
-       if (!ad->motion_data)
+       if (_init_master(ad))
                return false;
 
-       // Declare new sensor data for LED data
-       ad->led_data = sensor_data_new(SENSOR_DATA_TYPE_STR);
-
-       if (!ad->led_data)
-               return false;
-
-       sensor_data_set_string(ad->led_data, SENSOR_LED_INIT, strlen(SENSOR_LED_INIT));
-
-#ifdef USE_ST_SDK
-       if (st_thing_master_init(ad))
-               return false;
-
-       if (st_thing_resource_init(ad)) {
-               st_thing_master_fini(ad);
+       if (_init_resource(ad)) {
+               _fini_master(ad);
                return false;
        }
 #endif
@@ -692,25 +616,21 @@ static bool service_app_create(void *user_data)
 
 static void service_app_control(app_control_h app_control, void *user_data)
 {
-       gathering_stop(user_data);
-       gathering_start(user_data);
+       _stop_gathering(user_data);
+       _start_gathering(user_data);
 }
 
 static void service_app_terminate(void *user_data)
 {
-       app_data *ad = (app_data *)user_data;
+       app_data *ad = user_data;
 
 #ifdef USE_ST_SDK
-       st_thing_resource_fini(ad);
-       st_thing_master_fini(ad);
+       _fini_resource(ad);
+       _fini_master(ad);
 #endif
 
        // Turn off LED light with __set_led()
-       __change_led_data(ad, LED_OFF);
-
-       // Free sensor Motion & LED data
-       sensor_data_free(ad->motion_data);
-       sensor_data_free(ad->led_data);
+       _set_led_data(ad, 0);
 
        // Close Motion and LED resources
        resource_close_infrared_motion_sensor();
diff --git a/src/sensor-data.c b/src/sensor-data.c
deleted file mode 100644 (file)
index 1435e18..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/* ****************************************************************
- *
- * Copyright 2017 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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 <pthread.h>
-#include "log.h"
-#include "sensor-data.h"
-
-struct __sensor_data_s {
-       sensor_data_type_e type;
-       union {
-               int int_val;
-               unsigned int uint_val;
-               bool b_val;
-               double d_val;
-               char *str_val;
-       } value;
-       pthread_mutex_t mutex;
-};
-
-sensor_data *sensor_data_new(sensor_data_type_e type)
-{
-       sensor_data *data = NULL;
-       retv_if(type == SENSOR_DATA_TYPE_NONE, NULL);
-
-       data = calloc(1, sizeof(sensor_data));
-       retv_if(!data, NULL);
-
-       data->type = type;
-       pthread_mutex_init(&data->mutex, NULL);
-
-       return data;
-}
-
-void sensor_data_free(sensor_data *data)
-{
-       ret_if(!data);
-
-       if (data->type == SENSOR_DATA_TYPE_STR) {
-               pthread_mutex_lock(&data->mutex);
-               free(data->value.str_val);
-               data->value.str_val = NULL;
-               pthread_mutex_unlock(&data->mutex);
-       }
-       pthread_mutex_destroy(&data->mutex);
-
-       free(data);
-}
-
-int sensor_data_set_int(sensor_data *data, int value)
-{
-       retv_if(!data, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_INT, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       data->value.int_val = value;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_set_uint(sensor_data *data, unsigned int value)
-{
-       retv_if(!data, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_UINT, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       data->value.uint_val = value;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_set_bool(sensor_data *data, bool value)
-{
-       retv_if(!data, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_BOOL, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       data->value.b_val = value;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_set_double(sensor_data *data, double value)
-{
-       retv_if(!data, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_DOUBLE, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       data->value.d_val = value;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_set_string(sensor_data *data, const char *value, unsigned int size)
-{
-       char *temp = NULL;
-       retv_if(!data, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_STR, -1);
-       retv_if(!value, -1);
-       retv_if(size == 0, -1);
-
-       temp = strndup(value, size);
-       retv_if(!temp, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       free(data->value.str_val);
-       data->value.str_val = temp;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-sensor_data_type_e sensor_data_get_type(sensor_data *data)
-{
-       retv_if(!data, SENSOR_DATA_TYPE_NONE);
-
-       return data->type;
-}
-
-int sensor_data_get_int(sensor_data *data, int *value)
-{
-       retv_if(!data, -1);
-       retv_if(!value, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_INT, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       *value = data->value.int_val;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_get_uint(sensor_data *data, unsigned int *value)
-{
-       retv_if(!data, -1);
-       retv_if(!value, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_UINT, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       *value = data->value.uint_val;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_get_bool(sensor_data *data, bool *value)
-{
-       retv_if(!data, -1);
-       retv_if(!value, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_BOOL, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       *value = data->value.b_val;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_get_double(sensor_data *data, double *value)
-{
-       retv_if(!data, -1);
-       retv_if(!value, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_DOUBLE, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       *value = data->value.d_val;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
-int sensor_data_get_string(sensor_data *data, const char **value)
-{
-       retv_if(!data, -1);
-       retv_if(!value, -1);
-       retv_if(data->type != SENSOR_DATA_TYPE_STR, -1);
-
-       pthread_mutex_lock(&data->mutex);
-       *value = data->value.str_val;
-       pthread_mutex_unlock(&data->mutex);
-
-       return 0;
-}
-
index 9ad18e4..83d5397 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="5.0" package="org.example.motion" version="1.0.0">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.0" package="org.example.smart-light" version="1.0.0">
     <profile name="iot-headed"/>
-    <service-application appid="org.example.motion" exec="motion" multiple="false" nodisplay="true" on-boot="false" taskmanage="false" type="capp">
-        <label>motion</label>
-        <icon>motion.png</icon>
+    <service-application appid="org.example.smart-light" exec="smart-light" multiple="false" nodisplay="true" on-boot="true" taskmanage="false" type="capp">
+        <label>smart-light</label>
+        <icon>smart-light.png</icon>
         <metadata key="http://tizen.org/iot/metadata/master" value="shared/res/master.json"/>
         <metadata key="http://tizen.org/iot/metadata/resource" value="shared/res/resource.json"/>
         <background-category value="background-network"/>