diff options
-rw-r--r-- | .cproject | 643 | ||||
-rwxr-xr-x | .exportMap | 5 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | .project | 52 | ||||
-rw-r--r-- | .tproject | 12 | ||||
-rwxr-xr-x | LICENSE.APLv2 | 202 | ||||
-rwxr-xr-x | NOTICE | 3 | ||||
m--------- | basic-interrupted | 8 | ||||
m--------- | basic-timer | 9 | ||||
-rw-r--r-- | inc/log.h | 97 | ||||
-rwxr-xr-x | inc/resource/resource_infrared_motion.h | 51 | ||||
-rwxr-xr-x | inc/resource/resource_led.h | 34 | ||||
-rw-r--r-- | lib/libst_thing_master_api.so | bin | 0 -> 111204 bytes | |||
-rw-r--r-- | lib/libst_thing_resource_api.so | bin | 0 -> 72524 bytes | |||
-rw-r--r-- | project_def.prop | 11 | ||||
-rw-r--r-- | shared/res/icon.png | bin | 0 -> 57662 bytes | |||
-rw-r--r-- | shared/res/master.json | 18 | ||||
-rw-r--r-- | shared/res/resource.json | 52 | ||||
-rwxr-xr-x | src/controller.c | 122 | ||||
-rwxr-xr-x | src/resource/resource_infrared_motion.c | 195 | ||||
-rwxr-xr-x | src/resource/resource_led.c | 101 | ||||
-rw-r--r-- | tizen-manifest.xml | 15 |
22 files changed, 1621 insertions, 17 deletions
diff --git a/.cproject b/.cproject new file mode 100644 index 0000000..65556d0 --- /dev/null +++ b/.cproject @@ -0,0 +1,643 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> + <storageModule moduleId="org.eclipse.cdt.core.settings"> + <cconfiguration id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1684968043"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecore.config.sbi.gcc45.app.debug.1684968043" moduleId="org.eclipse.cdt.core.settings" name="Debug"> + <externalSettings/> + <extensions> + <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> + <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.tizen.nativecore.NativeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + </extensions> + </storageModule> + <storageModule moduleId="cdtBuildSystem" version="4.0.0"> + <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"/> + <builder autoBuildTarget="all" buildPath="${workspace_loc:/co2}/Debug" enableAutoBuild="true" id="org.tizen.nativecore.target.sbi.gnu.builder.327093003" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/> + <tool command="arm-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.111989657" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/> + <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.1495701674" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler"> + <option id="gnu.cpp.compiler.option.optimization.level.927516291" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.more" valueType="enumerated"/> + <option defaultValue="gnu.cpp.compiler.debugging.level.max" id="sbi.gnu.cpp.compiler.option.debugging.level.core.1484656362" 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.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-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="Native_API"/> + </option> + <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1381199239" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/asp/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/attach-panel""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cbhm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/context-service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/csr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali-toolkit""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dbus-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device-certificate-manager""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dlog""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-buffer-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-con-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-file-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-ipc-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ector-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/edje-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-extension""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efreet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1/eina""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eio-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/elementary-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/embryo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/emile-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eom""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-client-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/feedback""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/fontconfig""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/freetype2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/geofence""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/gio-unix-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/glib-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/harfbuzz""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotcon""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotjs""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/json-glib-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/location""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/maps""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media-content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/messaging""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/metadata-editor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minicontrol""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minizip""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/network""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/notification""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/nsd/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/phonenumber-utils""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/privacy-privilege-manager/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/rpc-port""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/sensor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/shortcut""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tef""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui-viewmgr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/web""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/wifi-direct""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> + </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"> + <listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value=" -fPIE"/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + <listOptionValue builtIn="false" value="-mthumb"/> + </option> + <option id="sbi.gnu.cpp.compiler.option.preprocessor.def.deprecation.1481967674" name="Defined symbols (-D)" superClass="sbi.gnu.cpp.compiler.option.preprocessor.def.deprecation" useByScannerDiscovery="false" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="TIZEN_DEPRECATION"/> + <listOptionValue builtIn="false" value="DEPRECATION_WARNING"/> + <listOptionValue builtIn="false" value="_DEBUG"/> + </option> + <option id="gnu.cpp.compiler.option.include.paths.194754833" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/> + </option> + <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1893389969" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> + </tool> + <tool command="clang" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.655028722" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler"> + <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1280615976" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/> + <option defaultValue="gnu.c.debugging.level.max" id="sbi.gnu.c.compiler.option.debugging.level.core.440810614" 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.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-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="Native_API"/> + </option> + <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1993317799" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/asp/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/attach-panel""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cbhm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/context-service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/csr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali-toolkit""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dbus-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device-certificate-manager""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dlog""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-buffer-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-con-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-file-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-ipc-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ector-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/edje-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-extension""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efreet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1/eina""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eio-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/elementary-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/embryo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/emile-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eom""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-client-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/feedback""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/fontconfig""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/freetype2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/geofence""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/gio-unix-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/glib-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/harfbuzz""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotcon""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotjs""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/json-glib-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/location""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/maps""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media-content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/messaging""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/metadata-editor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minicontrol""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minizip""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/network""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/notification""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/nsd/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/phonenumber-utils""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/privacy-privilege-manager/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/rpc-port""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/sensor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/shortcut""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tef""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui-viewmgr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/web""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/wifi-direct""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> + </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"> + <listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value=" -fPIE"/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + <listOptionValue builtIn="false" value="-mthumb"/> + </option> + <option id="sbi.gnu.c.compiler.option.preprocessor.def.symbols.deprecation.1953195779" name="Defined symbols (-D)" superClass="sbi.gnu.c.compiler.option.preprocessor.def.symbols.deprecation" useByScannerDiscovery="false" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="TIZEN_DEPRECATION"/> + <listOptionValue builtIn="false" value="DEPRECATION_WARNING"/> + <listOptionValue builtIn="false" value="_DEBUG"/> + </option> + <option id="gnu.c.compiler.option.include.paths.1327550699" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/> + </option> + <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1767616947" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> + </tool> + <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1177668982" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/> + <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.352176959" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker"> + <option defaultValue="false" id="sbi.gnu.cpp.link.option.strip.726351699" name="Omit all symbol information (-s)" superClass="sbi.gnu.cpp.link.option.strip" valueType="boolean"/> + <option defaultValue="false" id="sbi.gnu.cpp.linker.option.shared_flag.core.995372830" name="Linker.Shared" superClass="sbi.gnu.cpp.linker.option.shared_flag.core" valueType="boolean"/> + <option defaultValue="false" id="sbi.gnu.cpp.linker.option.noundefined.core.757485109" name="Report unresolved symbol references (-Wl,--no-undefined)" superClass="sbi.gnu.cpp.linker.option.noundefined.core" valueType="boolean"/> + <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.1283583507" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" useByScannerDiscovery="false" valueType="stringList"> + <listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/> + <listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/> + <listOptionValue builtIn="false" value="-pie -lpthread "/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + <listOptionValue builtIn="false" value="-Xlinker --version-script="${PROJ_PATH}/.exportMap""/> + <listOptionValue builtIn="false" value="-L"${SBI_SYSROOT}/usr/lib""/> + <listOptionValue builtIn="false" value="$(RS_LIBRARIES)"/> + </option> + <option id="gnu.cpp.link.option.paths.1531158283" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/> + </option> + <option id="gnu.cpp.link.option.libs.1983413821" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs"> + <listOptionValue builtIn="false" value="st_thing_resource_api"/> + <listOptionValue builtIn="false" value="st_thing_master_api"/> + </option> + <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.416514610" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> + <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> + <additionalInput kind="additionalinput" paths="$(LIBS)"/> + </inputType> + </tool> + <tool command="#{PLATFORM_DEFAULT_GCC_PREFIX}as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1305330268" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base"> + <inputType id="cdt.managedbuild.tool.gnu.assembler.input.315327703" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> + </tool> + <tool id="org.tizen.nativecore.tool.fnmapgen.852701578" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/> + <tool id="org.tizen.nativecore.tool.fnmapgen.cpp.1287435170" name="C++ FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen.cpp"/> + <tool id="org.tizen.nativecore.tool.ast.2092789826" name="C Static Analyzer" superClass="org.tizen.nativecore.tool.ast"/> + <tool id="org.tizen.nativecore.tool.ast.cpp.684602459" name="C++ Static Analyzer" superClass="org.tizen.nativecore.tool.ast.cpp"/> + <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.2103598812" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/> + <tool id="org.tizen.nativecore.tool.sbi.po.compiler.1376941442" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/> + <tool id="org.tizen.nativecore.tool.sbi.edc.compiler.929720447" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler"/> + </toolChain> + </folderInfo> + <sourceEntries> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="shared"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> + </sourceEntries> + </configuration> + </storageModule> + <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> + </cconfiguration> + <cconfiguration id="org.tizen.nativecore.config.sbi.gcc45.app.release.1935466489"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecore.config.sbi.gcc45.app.release.1935466489" moduleId="org.eclipse.cdt.core.settings" name="Release"> + <externalSettings/> + <extensions> + <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> + <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.tizen.nativecore.NativeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + </extensions> + </storageModule> + <storageModule moduleId="cdtBuildSystem" version="4.0.0"> + <configuration artifactName="co2" 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.release" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecore.config.sbi.gcc45.app.release.1935466489" name="Release" parent="org.tizen.nativecore.config.sbi.gcc45.app.release"> + <folderInfo id="org.tizen.nativecore.config.sbi.gcc45.app.release.1935466489." name="/" resourcePath=""> + <toolChain id="org.tizen.nativecore.toolchain.sbi.gcc45.app.release.971305695" name="Tizen Native Toolchain" superClass="org.tizen.nativecore.toolchain.sbi.gcc45.app.release"> + <targetPlatform id="org.tizen.nativeide.target.sbi.gnu.platform.base.119382938" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/> + <builder buildPath="${workspace_loc:/co2}/Release" id="org.tizen.nativecore.target.sbi.gnu.builder.1611287494" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecore.target.sbi.gnu.builder"/> + <tool command="arm-linux-gnueabi-ar" id="org.tizen.nativecore.tool.sbi.gnu.archiver.697364366" name="Archiver" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver"/> + <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler.2058269282" name="C++ Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.compiler"> + <option id="gnu.cpp.compiler.option.optimization.level.264877893" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> + <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-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=""${SBI_SYSROOT}/usr/include/libxml2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/asp/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/attach-panel""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cbhm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/context-service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/csr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali-toolkit""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dbus-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device-certificate-manager""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dlog""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-buffer-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-con-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-file-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-ipc-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ector-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/edje-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-extension""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efreet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1/eina""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eio-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/elementary-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/embryo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/emile-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eom""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-client-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/feedback""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/fontconfig""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/freetype2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/geofence""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/gio-unix-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/glib-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/harfbuzz""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotcon""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotjs""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/json-glib-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/location""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/maps""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media-content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/messaging""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/metadata-editor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minicontrol""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minizip""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/network""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/notification""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/nsd/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/phonenumber-utils""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/privacy-privilege-manager/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/rpc-port""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/sensor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/shortcut""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tef""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui-viewmgr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/web""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/wifi-direct""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> + </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"> + <listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value=" -fPIE"/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + <listOptionValue builtIn="false" value="-mthumb"/> + </option> + <option id="gnu.cpp.compiler.option.include.paths.948468903" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/> + </option> + <option id="sbi.gnu.cpp.compiler.option.frameworks.core.1876042437" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.core" valueType="userObjs"> + <listOptionValue builtIn="false" value="Native_API"/> + <listOptionValue builtIn="false" value="iot-things"/> + </option> + <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1699332162" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> + </tool> + <tool command="clang" id="org.tizen.nativecore.tool.sbi.gnu.c.compiler.380226457" name="C Compiler" superClass="org.tizen.nativecore.tool.sbi.gnu.c.compiler"> + <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.217049521" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/> + <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-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=""${SBI_SYSROOT}/usr/include/libxml2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/asp/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/attach-panel""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/badge""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/base""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cairo""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/calendar-service2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/cbhm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/chromium-ewk""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ckm""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/contacts-svc""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/context-service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/csr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dali-toolkit""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dbus-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/device-certificate-manager""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/dlog""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-buffer-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-con-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-file-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-imf-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-input-evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ecore-ipc-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ector-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/edje-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-extension""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efreet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1/eina""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eio-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/elementary-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/embryo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/emile-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eo-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eom""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ethumb-client-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/evas-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/feedback""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/fontconfig""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/freetype2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/geofence""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/gio-unix-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/glib-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/harfbuzz""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotcon""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotjs""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/json-glib-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/location""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/maps""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media-content""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/messaging""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/metadata-editor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minicontrol""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minizip""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/network""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/notification""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/nsd/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/phonenumber-utils""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/privacy-privilege-manager/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/rpc-port""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/sensor""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/shortcut""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tef""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui-viewmgr""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vulkan""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/web""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/wifi-direct""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/yaca""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/dbus-1.0/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/lib/glib-2.0/include""/> + </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"> + <listOptionValue builtIn="false" value="${TC_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value="${RS_COMPILER_MISC}"/> + <listOptionValue builtIn="false" value=" -fPIE"/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + <listOptionValue builtIn="false" value="-mthumb"/> + </option> + <option id="gnu.c.compiler.option.include.paths.191249342" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/> + </option> + <option id="sbi.gnu.c.compiler.option.frameworks.core.520200633" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.core" valueType="userObjs"> + <listOptionValue builtIn="false" value="Native_API"/> + <listOptionValue builtIn="false" value="iot-things"/> + </option> + <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1222425051" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> + </tool> + <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.365872581" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/> + <tool command="clang++" id="org.tizen.nativecore.tool.sbi.gnu.cpp.linker.1312122827" name="C++ Linker" superClass="org.tizen.nativecore.tool.sbi.gnu.cpp.linker"> + <option defaultValue="true" id="sbi.gnu.cpp.link.option.strip.1882225898" name="Omit all symbol information (-s)" superClass="sbi.gnu.cpp.link.option.strip" valueType="boolean"/> + <option defaultValue="false" id="sbi.gnu.cpp.linker.option.shared_flag.core.1932892694" name="Linker.Shared" superClass="sbi.gnu.cpp.linker.option.shared_flag.core" valueType="boolean"/> + <option defaultValue="false" id="sbi.gnu.cpp.linker.option.noundefined.core.1192546854" name="Report unresolved symbol references (-Wl,--no-undefined)" superClass="sbi.gnu.cpp.linker.option.noundefined.core" valueType="boolean"/> + <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.core.1508340608" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.core" valueType="stringList"> + <listOptionValue builtIn="false" value="${TC_LINKER_MISC}"/> + <listOptionValue builtIn="false" value="${RS_LINKER_MISC}"/> + <listOptionValue builtIn="false" value="-pie -lpthread "/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + <listOptionValue builtIn="false" value="-Xlinker --version-script="${PROJ_PATH}/.exportMap""/> + <listOptionValue builtIn="false" value="-L"${SBI_SYSROOT}/usr/lib""/> + <listOptionValue builtIn="false" value="$(RS_LIBRARIES)"/> + </option> + <option id="gnu.cpp.link.option.paths.1696497436" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/> + </option> + <option id="gnu.cpp.link.option.libs.627922936" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs"> + <listOptionValue builtIn="false" value="oicdastack"/> + <listOptionValue builtIn="false" value="sdkapi"/> + </option> + <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1873516416" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> + <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> + <additionalInput kind="additionalinput" paths="$(LIBS)"/> + </inputType> + </tool> + <tool command="#{PLATFORM_DEFAULT_GCC_PREFIX}as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1104785016" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base"> + <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1550184112" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> + </tool> + <tool id="org.tizen.nativecore.tool.fnmapgen.990723863" name="C FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen"/> + <tool id="org.tizen.nativecore.tool.fnmapgen.cpp.2088866111" name="C++ FN-Map Generator" superClass="org.tizen.nativecore.tool.fnmapgen.cpp"/> + <tool id="org.tizen.nativecore.tool.ast.882812246" name="C Static Analyzer" superClass="org.tizen.nativecore.tool.ast"/> + <tool id="org.tizen.nativecore.tool.ast.cpp.1800255051" name="C++ Static Analyzer" superClass="org.tizen.nativecore.tool.ast.cpp"/> + <tool id="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib.1697850482" name="Archive Generator" superClass="org.tizen.nativecore.tool.sbi.gnu.archiver.mergelib"/> + <tool id="org.tizen.nativecore.tool.sbi.po.compiler.76565439" name="PO Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.po.compiler"/> + <tool id="org.tizen.nativecore.tool.sbi.edc.compiler.375751107" name="EDC Resource Compiler" superClass="org.tizen.nativecore.tool.sbi.edc.compiler"/> + </toolChain> + </folderInfo> + <sourceEntries> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="shared"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> + </sourceEntries> + </configuration> + </storageModule> + <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> + </cconfiguration> + </storageModule> + <storageModule moduleId="cdtBuildSystem" version="4.0.0"> + <project id="co2.org.tizen.nativecore.target.sbi.gcc45.app.253664086" name="Tizen Native Application" projectType="org.tizen.nativecore.target.sbi.gcc45.app"/> + </storageModule> + <storageModule moduleId="scannerConfiguration"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> + <scannerConfigBuildInfo instanceId="org.tizen.nativecore.config.sbi.gcc45.app.debug.1684968043"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> + </scannerConfigBuildInfo> + <scannerConfigBuildInfo instanceId="org.tizen.nativecore.config.sbi.gcc45.app.release.1935466489"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> + </scannerConfigBuildInfo> + </storageModule> + <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> + <storageModule moduleId="refreshScope" versionNumber="2"> + <configuration configurationName="Debug"> + <resource resourceType="PROJECT" workspacePath="/co2"/> + </configuration> + <configuration configurationName="Release"> + <resource resourceType="PROJECT" workspacePath="/co2"/> + </configuration> + </storageModule> + <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> +</cproject> diff --git a/.exportMap b/.exportMap new file mode 100755 index 0000000..de30516 --- /dev/null +++ b/.exportMap @@ -0,0 +1,5 @@ +{ + global: main; + _IO_*; + local: *; +}; diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5f489ce --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +/Debug/ +/SA_Report/ +/.sign/ +/res/certificate.pem +/res/privatekey.der +/crash-info/ +/.package-stamp +/res/ diff --git a/.project b/.project new file mode 100644 index 0000000..1bffd91 --- /dev/null +++ b/.project @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>smart-light-basic-timer</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.tizen.nativecore.apichecker.apicheckerbuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.cdt.core.cnature</nature> + <nature>org.eclipse.cdt.core.ccnature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> + <nature>org.tizen.nativecore.apichecker.apicheckernature</nature> + </natures> + <filteredResources> + <filter> + <id>0</id> + <name></name> + <type>26</type> + <matcher> + <id>org.eclipse.ui.ide.multiFilter</id> + <arguments>1.0-projectRelativePath-matches-false-false-*/.tpk</arguments> + </matcher> + </filter> + <filter> + <id>0</id> + <name></name> + <type>6</type> + <matcher> + <id>org.eclipse.ui.ide.multiFilter</id> + <arguments>1.0-name-matches-false-false-project_def.prop</arguments> + </matcher> + </filter> + </filteredResources> +</projectDescription> diff --git a/.tproject b/.tproject new file mode 100644 index 0000000..7bd616a --- /dev/null +++ b/.tproject @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<tproject xmlns="http://www.tizen.org/tproject"> + <platforms> + <platform> + <name>iot-headless-5.0</name> + </platform> + </platforms> + <package> + <blacklist/> + <resFallback autoGen="true"/> + </package> +</tproject> diff --git a/LICENSE.APLv2 b/LICENSE.APLv2 new file mode 100755 index 0000000..d645695 --- /dev/null +++ b/LICENSE.APLv2 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. @@ -0,0 +1,3 @@ +Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Apache License, Version 2. +Please, see the LICENSE.APLv2 file for Apache License, Version 2 terms and conditions. diff --git a/basic-interrupted b/basic-interrupted deleted file mode 160000 -Subproject 71be3d8daf587a2a5221dcda7d16227577bd857 diff --git a/basic-timer b/basic-timer deleted file mode 160000 -Subproject 9860e2f54df01e11ed05c38d50a573a4e55a176 diff --git a/inc/log.h b/inc/log.h new file mode 100644 index 0000000..e9e2b41 --- /dev/null +++ b/inc/log.h @@ -0,0 +1,97 @@ +/* **************************************************************** + * + * 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 __LOG_H__ +#define __LOG_H__ + +#include <dlog.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "SMART_LIGHT" + +#define _E(fmt, args...) dlog_print(DLOG_ERROR, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args) +#define _W(fmt, args...) dlog_print(DLOG_WARN, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args) +#define _I(fmt, args...) dlog_print(DLOG_INFO, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args) +#define _D(fmt, args...) dlog_print(DLOG_DEBUG, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args) + +#define FN_CALL dlog_print(DLOG_DEBUG, LOG_TAG, ">>>>>>>> %s() called\n", __func__) +#define FN_END dlog_print(DLOG_DEBUG, LOG_TAG, "<<<<<<<< %s() ended\n", __func__) + + +#define retvm_if(expr, val, fmt, arg...) do { \ + if (expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return val; \ + } \ +} while (0) + +#define retv_if(expr, val) do { \ + if (expr) { \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return (val); \ + } \ +} while (0) + +#define retm_if(expr, fmt, arg...) do { \ + if (expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return; \ + } \ +} while (0) + +#define ret_if(expr) do { \ + if (expr) { \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return; \ + } \ +} while (0) + +#define goto_if(expr, val) do { \ + if (expr) { \ + _E("(%s) -> goto", #expr); \ + goto val; \ + } \ +} while (0) + +#define break_if(expr) { \ + if (expr) { \ + _E("(%s) -> break", #expr); \ + break; \ + } \ +} + +#define continue_if(expr) { \ + if (expr) { \ + _E("(%s) -> continue", #expr); \ + continue; \ + } \ +} + +#ifdef __cplusplus +} +#endif + +#endif /* __LOG_H__ */ + diff --git a/inc/resource/resource_infrared_motion.h b/inc/resource/resource_infrared_motion.h new file mode 100755 index 0000000..115c634 --- /dev/null +++ b/inc/resource/resource_infrared_motion.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT 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 __RESOURCE_INFRARED_MOTION_H__ +#define __RESOURCE_INFRARED_MOTION_H__ + +typedef void (*resource_infrared_motion_interrupted_cb) (uint32_t motion_value, void *user_data); + +/** + * @brief Reads value of gpio connected infrared motion sensor (HC-SR501) + * @param[in] pin_num The gpio pin number for the infrared motion sensor + * @param[out] out_value The value of the gpio (zero or non-zero) + * @return 0 on success, otherwise a negative error value + * @see If the gpio pin is not open, create gpio handle before reading the value + */ +extern int resource_read_infrared_motion(int pin_num, uint32_t *out_value); + +/** + * @brief Releases the gpio handle + */ +extern void resource_close_infrared_motion(void); + +/** + * @brief Sets an interrupted callback to be invoked when interrupt is triggered on motion sensor + * @param[in] pin_num The gpio pin number for the infrared motion sensor + * @param[in] interrupted_cb interrupted user callback to be invoked + * @return 0 on success, otherwise a negative error value + * @see If the gpio pin is not open, create gpio handle before reading the value + */ +extern int resource_set_interrupted_cb_infrared_motion(int pin_num, resource_infrared_motion_interrupted_cb interrupted_cb, void *user_data); + +/** + * @brief Unsets the interrupted callback for motion sensor + * @param[in] pin_num The gpio pin number for the infrared motion sensor + */ +extern int resource_unset_interrupted_cb_infrared_motion(int pin_num); + +#endif /* __RESOURCE_INFRARED_MOTION_H__ */ diff --git a/inc/resource/resource_led.h b/inc/resource/resource_led.h new file mode 100755 index 0000000..4adf22f --- /dev/null +++ b/inc/resource/resource_led.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT 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 __RESOURCE_LED_H__ +#define __RESOURCE_LED_H__ + +/** + * @brief Writes value of gpio connected led light + * @param[in] pin_num The gpio pin number for the led light + * @param[out] out_value The value of turniing the led light on/off + * @return 0 on success, otherwise a negative error value + * @see If the gpio pin is not open, create gpio handle before writing the value + */ +extern int resource_write_led(int pin_num, int write_value); + +/** + * @brief Releases the gpio handle + */ +extern void resource_close_led(void); + +#endif /* __RESOURCE_LED_H__ */ diff --git a/lib/libst_thing_master_api.so b/lib/libst_thing_master_api.so Binary files differnew file mode 100644 index 0000000..aef594a --- /dev/null +++ b/lib/libst_thing_master_api.so diff --git a/lib/libst_thing_resource_api.so b/lib/libst_thing_resource_api.so Binary files differnew file mode 100644 index 0000000..245093f --- /dev/null +++ b/lib/libst_thing_resource_api.so diff --git a/project_def.prop b/project_def.prop new file mode 100644 index 0000000..b6a64c2 --- /dev/null +++ b/project_def.prop @@ -0,0 +1,11 @@ +APPNAME = smart-light + +type = app +profile = iot-headed-5.0 + +USER_SRCS = src/smart-light.c +USER_DEFS = +USER_INC_DIRS = inc +USER_OBJS = +USER_LIBS = lib/libst_thing_master_api.so, lib/libst_thing_resource_api.so +USER_EDCS = diff --git a/shared/res/icon.png b/shared/res/icon.png Binary files differnew file mode 100644 index 0000000..9765b1b --- /dev/null +++ b/shared/res/icon.png diff --git a/shared/res/master.json b/shared/res/master.json new file mode 100644 index 0000000..7d27d0f --- /dev/null +++ b/shared/res/master.json @@ -0,0 +1,18 @@ +{ + "devices": [ + { + "deviceType": "oic.d.light", + "deviceName": "***Your Device Name***", + "mnid": "***Your MNID***", + "vid": "***Your Vendor ID***" + } + ], + "configuration": { + "easySetup": { + "mode": 1, + "setupId": "***Your Setup ID***" + }, + "otm": 2, + "crtType": 1 + } +}
\ No newline at end of file diff --git a/shared/res/resource.json b/shared/res/resource.json new file mode 100644 index 0000000..14d7ba5 --- /dev/null +++ b/shared/res/resource.json @@ -0,0 +1,52 @@ +{ + "resources": { + "single": [ + { + "uri": "/capability/motionSensor/main/0", + "types": [ + "oic.r.sensor.motion" + ], + "interfaces": [ + "oic.if.s", + "oic.if.baseline" + ] + }, + { + "uri": "/capability/switch/main/0", + "types": [ + "x.com.st.powerswitch" + ], + "interfaces": [ + "oic.if.a", + "oic.if.baseline" + ] + } + ] + }, + "resourceTypes": [ + { + "type": "oic.r.sensor.motion", + "properties": [ + { + "key": "value", + "type": "boolean", + "readOnly": 1, + "mandatory": false, + "isArray": false + } + ] + }, + { + "type": "x.com.st.powerswitch", + "properties": [ + { + "key": "power", + "type": "string", + "readOnly": 3, + "mandatory": true, + "isArray": false + } + ] + } + ] +}
\ No newline at end of file diff --git a/src/controller.c b/src/controller.c new file mode 100755 index 0000000..6595ea2 --- /dev/null +++ b/src/controller.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <tizen.h> +#include <service_app.h> +#include <string.h> +#include <stdlib.h> +#include <stdint.h> +#include <Ecore.h> + +#include "log.h" +#include "resource/resource_infrared_motion.h" +#include "resource/resource_led.h" + +// Timer duration +#define TIMER_GATHER_INTERVAL (2.0f) + +// Motion sensor information +#define SENSOR_MOTION_GPIO_NUMBER (18) + +// LED sensor information +#define SENSOR_LED_GPIO_NUMBER (24) + +Ecore_Timer *getter_timer = NULL; + +static int _change_led_state(int state) { + int ret = 0; + + // Write state to LED light + ret = resource_write_led(SENSOR_LED_GPIO_NUMBER, state); + if (ret != 0) { + _E("cannot write led data"); + return -1; + } + + _I("LED State : %s", state ? "ON":"OFF"); + + return 0; +} + +static Eina_Bool _get_motion_set_led(void *user_data) +{ + int ret = 0; + uint32_t value = 0; + + // Get value from motion sensor + ret = resource_read_infrared_motion(SENSOR_MOTION_GPIO_NUMBER, &value); + if (ret != 0) { + _E("cannot read data from the infrared motion sensor"); + return ECORE_CALLBACK_CANCEL; + } + + _I("Detected motion value : %u", value); + + // Set LED light with value + _change_led_state(value); + + return ECORE_CALLBACK_RENEW; +} + +static bool service_app_create(void *user_data) +{ + return true; +} + +static void service_app_control(app_control_h app_control, void *user_data) +{ + // Delete old timer if there is one + if (getter_timer) { + ecore_timer_del(getter_timer); + getter_timer = NULL; + } + + // Create a timer to call the given function in given period of time + getter_timer = ecore_timer_add(TIMER_GATHER_INTERVAL, _get_motion_set_led, user_data); + if (!getter_timer) { + _E("Failed to add getter timer"); + return; + } +} + +static void service_app_terminate(void *user_data) +{ + // Delete timer + if (getter_timer) { + ecore_timer_del(getter_timer); + getter_timer = NULL; + } + + // Turn off LED light with __set_led() + _change_led_state(0); + + // Close Motion and LED resources + resource_close_infrared_motion(); + resource_close_led(); + + FN_END; +} + +int main(int argc, char *argv[]) +{ + service_app_lifecycle_callback_s event_callback; + + event_callback.create = service_app_create; + event_callback.terminate = service_app_terminate; + event_callback.app_control = service_app_control; + + return service_app_main(argc, argv, &event_callback, NULL); +} diff --git a/src/resource/resource_infrared_motion.c b/src/resource/resource_infrared_motion.c new file mode 100755 index 0000000..9263143 --- /dev/null +++ b/src/resource/resource_infrared_motion.c @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <peripheral_io.h> +#include "resource/resource_infrared_motion.h" +#include "log.h" + +enum { + MOTION_HANDLE_ERROR_NONE = 0, /**< Successful */ + MOTION_HANDLE_ERROR_NOT_OPEN, + MOTION_HANDLE_ERROR_INVALID_PIN +} motion_handle_error_e; + +struct resource_im_interrupted_data { + resource_infrared_motion_interrupted_cb interrupted_cb; + void *interrupted_cb_user_data; + uint32_t motion_value; +}; + +static peripheral_gpio_h g_sensor_h = NULL; +static int g_pin_num = -1; +static struct resource_im_interrupted_data g_interrupted_data; + +static int _resource_validate_infrared_motion(int pin_num) +{ + int ret = MOTION_HANDLE_ERROR_NONE; + + if (!g_sensor_h) + { + ret = MOTION_HANDLE_ERROR_NOT_OPEN; + } else if (g_pin_num != pin_num) { + ret = MOTION_HANDLE_ERROR_INVALID_PIN; + } + + return ret; +} + +static int resource_open_infrared_motion(int pin_num) +{ + int ret = PERIPHERAL_ERROR_NONE; + peripheral_gpio_h temp = NULL; + + ret = peripheral_gpio_open(pin_num, &temp); + if (ret != PERIPHERAL_ERROR_NONE) { + _E("peripheral_gpio_open failed."); + return -1; + } + + // It should be removed after peripheral-io is patched. + peripheral_gpio_set_direction(temp, PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW); + if (ret) { + peripheral_gpio_close(temp); + _E("peripheral_gpio_set_direction failed."); + return -1; + } + + ret = peripheral_gpio_set_direction(temp, PERIPHERAL_GPIO_DIRECTION_IN); + if (ret != PERIPHERAL_ERROR_NONE) { + peripheral_gpio_close(temp); + _E("peripheral_gpio_set_direction failed."); + return -1; + } + + g_sensor_h = temp; + g_pin_num = pin_num; + + return 0; +} + +int resource_read_infrared_motion(int pin_num, uint32_t *out_value) +{ + int ret = PERIPHERAL_ERROR_NONE; + int ret_valid = MOTION_HANDLE_ERROR_NONE; + + ret_valid = _resource_validate_infrared_motion(pin_num); + if (ret_valid != MOTION_HANDLE_ERROR_NONE) { + if (ret_valid == MOTION_HANDLE_ERROR_NOT_OPEN) { + ret = resource_open_infrared_motion(pin_num); + retv_if(ret != PERIPHERAL_ERROR_NONE, -1); + } else if (ret_valid == MOTION_HANDLE_ERROR_INVALID_PIN) { + _E("Invalid pin number."); + return -1; + } + } + + ret = peripheral_gpio_read(g_sensor_h, out_value); + retv_if(ret != PERIPHERAL_ERROR_NONE, -1); + + return 0; +} + +void resource_close_infrared_motion(void) +{ + if (!g_sensor_h) return; + + _I("Infrared Motion Sensor is finishing..."); + + if (g_interrupted_data.interrupted_cb) { + peripheral_gpio_unset_interrupted_cb(g_sensor_h); + g_interrupted_data.interrupted_cb = NULL; + g_interrupted_data.interrupted_cb_user_data = NULL; + g_interrupted_data.motion_value = 0; + } + + peripheral_gpio_close(g_sensor_h); + + g_sensor_h = NULL; + g_pin_num = -1; +} + +void _resoucre_motion_interrupted_cb (peripheral_gpio_h gpio, peripheral_error_e error, void *user_data) +{ + if (!g_sensor_h) return; + + g_interrupted_data.motion_value = !g_interrupted_data.motion_value; + + g_interrupted_data.interrupted_cb(g_interrupted_data.motion_value, g_interrupted_data.interrupted_cb_user_data); +} + +int resource_set_interrupted_cb_infrared_motion(int pin_num, resource_infrared_motion_interrupted_cb interrupted_cb, void *user_data) +{ + int ret = PERIPHERAL_ERROR_NONE; + int ret_valid = MOTION_HANDLE_ERROR_NONE; + + retv_if(!interrupted_cb, -1); + + ret_valid = _resource_validate_infrared_motion(pin_num); + if (ret_valid == MOTION_HANDLE_ERROR_NOT_OPEN) { + ret = resource_open_infrared_motion(pin_num); + retv_if(ret != PERIPHERAL_ERROR_NONE, -1); + } else if (ret_valid == MOTION_HANDLE_ERROR_INVALID_PIN) { + _E("Invalid pin number."); + return -1; + } + + ret = peripheral_gpio_set_edge_mode(g_sensor_h, PERIPHERAL_GPIO_EDGE_BOTH); + retv_if(ret != PERIPHERAL_ERROR_NONE, -1); + + g_interrupted_data.motion_value = 0; + ret = peripheral_gpio_read(g_sensor_h, &g_interrupted_data.motion_value); + retv_if(ret != PERIPHERAL_ERROR_NONE, -1); + + ret = peripheral_gpio_set_interrupted_cb(g_sensor_h, _resoucre_motion_interrupted_cb, &g_interrupted_data); + goto_if(ret != PERIPHERAL_ERROR_NONE, ERROR); + + g_interrupted_data.interrupted_cb = interrupted_cb; + g_interrupted_data.interrupted_cb_user_data = user_data; + + return 0; + +ERROR: + _E("failed to read gpio"); + peripheral_gpio_unset_interrupted_cb(g_sensor_h); + g_interrupted_data.interrupted_cb = NULL; + g_interrupted_data.interrupted_cb_user_data = NULL; + g_interrupted_data.motion_value = 0; + return -1; +} + +int resource_unset_interrupted_cb_infrared_motion(int pin_num) +{ + int ret = PERIPHERAL_ERROR_NONE; + int ret_valid = MOTION_HANDLE_ERROR_NONE; + + ret_valid = _resource_validate_infrared_motion(pin_num); + if (ret_valid == MOTION_HANDLE_ERROR_NOT_OPEN) { + _E("No open handle."); + return -1; + } else if (ret_valid == MOTION_HANDLE_ERROR_INVALID_PIN) { + _E("Invalid pin number."); + return -1; + } + + ret = peripheral_gpio_unset_interrupted_cb(g_sensor_h); + retv_if(ret != PERIPHERAL_ERROR_NONE, -1); + + g_interrupted_data.interrupted_cb = NULL; + g_interrupted_data.interrupted_cb_user_data = NULL; + g_interrupted_data.motion_value = 0; + + return 0; +} diff --git a/src/resource/resource_led.c b/src/resource/resource_led.c new file mode 100755 index 0000000..a6edd7c --- /dev/null +++ b/src/resource/resource_led.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <peripheral_io.h> +#include "resource/resource_led.h" +#include "log.h" + +typedef enum { + LED_HANDLE_ERROR_NONE = 0, /**< Successful */ + LED_HANDLE_ERROR_NOT_OPEN, + LED_HANDLE_ERROR_INVALID_PIN +} led_handle_error_e; + +static peripheral_gpio_h g_sensor_h = NULL; +static int g_pin_num = -1; + +int _resource_validate_led(int pin_num) +{ + int ret = LED_HANDLE_ERROR_NONE; + + if (!g_sensor_h) + { + ret = LED_HANDLE_ERROR_NOT_OPEN; + } else if (g_pin_num != pin_num) { + ret = LED_HANDLE_ERROR_INVALID_PIN; + } + + return ret; +} + +int resource_open_led(int pin_num) +{ + int ret = PERIPHERAL_ERROR_NONE; + peripheral_gpio_h temp = NULL; + + ret = peripheral_gpio_open(pin_num, &temp); + if (ret != PERIPHERAL_ERROR_NONE) { + peripheral_gpio_close(temp); + _E("peripheral_gpio_open failed."); + return -1; + } + + ret = peripheral_gpio_set_direction(temp, PERIPHERAL_GPIO_DIRECTION_OUT_INITIALLY_LOW); + if (ret != PERIPHERAL_ERROR_NONE) { + peripheral_gpio_close(temp); + _E("peripheral_gpio_set_direction failed."); + return -1; + } + + g_sensor_h = temp; + g_pin_num = pin_num; + + return 0; +} + +void resource_close_led(void) +{ + if (!g_sensor_h) return; + + _I("LED is finishing..."); + + peripheral_gpio_close(g_sensor_h); + + g_sensor_h = NULL; + g_pin_num = -1; +} + +int resource_write_led(int pin_num, int write_value) +{ + int ret = PERIPHERAL_ERROR_NONE; + int ret_valid = LED_HANDLE_ERROR_NONE; + + ret_valid = _resource_validate_led(pin_num); + if (ret_valid != LED_HANDLE_ERROR_NONE) { + if (ret_valid == LED_HANDLE_ERROR_NOT_OPEN) { + ret = resource_open_led(pin_num); + retv_if(ret != PERIPHERAL_ERROR_NONE, -1); + } else if (ret_valid == LED_HANDLE_ERROR_INVALID_PIN) { + _E("Invalid pin number."); + return -1; + } + } + + ret = peripheral_gpio_write(g_sensor_h, write_value); + retv_if(ret < 0, -1); + + return 0; +} diff --git a/tizen-manifest.xml b/tizen-manifest.xml new file mode 100644 index 0000000..ffb309a --- /dev/null +++ b/tizen-manifest.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<manifest xmlns="http://tizen.org/ns/packages" api-version="5.0" package="org.example.smart-light" version="1.0.0"> + <profile name="iot-headless"/> + <service-application appid="org.example.smart-light" exec="smart-light" multiple="false" nodisplay="true" on-boot="false" taskmanage="false" type="capp"> + <label>smart-light</label> + <icon>icon.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"/> + <background-category value="iot-communication"/> + </service-application> + <privileges> + <privilege>http://tizen.org/privilege/peripheralio</privilege> + </privileges> +</manifest> |