Make base directory architecture for multi packaging
authorjunkyu han <junkyu.han@samsung.com>
Tue, 3 Apr 2018 00:28:43 +0000 (09:28 +0900)
committerjunkyu han <junkyu.han@samsung.com>
Tue, 3 Apr 2018 00:28:43 +0000 (09:28 +0900)
29 files changed:
CMakeList.txt [deleted file]
CMakeLists.txt [new file with mode: 0644]
LICENSE.Flora [new file with mode: 0644]
NOTICE [new file with mode: 0644]
daemon/CMakeList.txt [deleted file]
org.tizen.tizen-things-daemon.manifest [new file with mode: 0644]
packaging/tizen-things-daemon.service [new file with mode: 0644]
packaging/tizen-things-daemon.spec
tizen-things-daemon.xml [new file with mode: 0644]
tizen-things-daemon/CMakeLists.txt [new file with mode: 0644]
tizen-things-daemon/inc/log.h [new file with mode: 0644]
tizen-things-daemon/inc/ttd-queue.h [new file with mode: 0644]
tizen-things-daemon/inc/ttd-status.h [new file with mode: 0644]
tizen-things-daemon/inc/ttd-worker-handle.h [new file with mode: 0644]
tizen-things-daemon/inc/ttd-worker-interface.h [new file with mode: 0644]
tizen-things-daemon/src/log.c [new file with mode: 0644]
tizen-things-daemon/src/tizen-things-daemon.c [new file with mode: 0644]
tizen-things-daemon/src/ttd-queue.c [new file with mode: 0644]
tizen-things-daemon/src/ttd-status.c [new file with mode: 0644]
tizen-things-daemon/src/ttd-worker-handle.c [new file with mode: 0644]
tizen-things-daemon/src/ttd-worker-interface.c [new file with mode: 0644]
workers/CMakeList.txt [deleted file]
workers/CMakeLists.txt [new file with mode: 0644]
workers/system-info/CMakeList.txt [deleted file]
workers/system-info/CMakeLists.txt [new file with mode: 0644]
workers/system-info/inc/controller.h [new file with mode: 0644]
workers/system-info/inc/log.h [new file with mode: 0644]
workers/system-info/src/controller.c [new file with mode: 0644]
workers/system-info/src/log.c [new file with mode: 0644]

diff --git a/CMakeList.txt b/CMakeList.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..612716b
--- /dev/null
@@ -0,0 +1,31 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(${P_NAME} C)
+
+SET(INSTALL_EXEC_PREFIX "${INSTALL_PREFIX}/bin")
+SET(PROJECT_ROOT_DIR "${CMAKE_SOURCE_DIR}")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+       capi-appfw-service-application
+       capi-system-info
+       dlog
+       elementary
+       libtzplatform-config
+       glib-2.0
+)
+
+FOREACH (flag ${pkgs_CFLAGS})
+    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Winline -g -fno-builtin-malloc -fPIE")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${P_NAME}.xml ${CMAKE_BINARY_DIR}/${ORG_PREFIX}.${P_NAME}.xml)
+
+ADD_SUBDIRECTORY(tizen-things-daemon)
+ADD_SUBDIRECTORY(workers)
+
+#install
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${ORG_PREFIX}.${P_NAME}.xml DESTINATION /usr/share/packages)
diff --git a/LICENSE.Flora b/LICENSE.Flora
new file mode 100644 (file)
index 0000000..4a0af40
--- /dev/null
@@ -0,0 +1,206 @@
+Flora License
+
+Version 1.1, April, 2013
+
+http://floralicense.org/license/
+
+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.
+
+"Tizen Certified Platform" shall mean a software platform that complies
+with the standards set forth in the Tizen Compliance Specification
+and passes the Tizen Compliance Tests as defined from time to time
+by the Tizen Technical Steering Group and certified by the Tizen
+Association or its designated agent.
+
+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
+solely as incorporated into a Tizen Certified Platform, 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 solely
+as incorporated into a Tizen Certified Platform 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 pursuant to the copyright license
+above, in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  1. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+  2. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+  3. 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
+  4. 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
+     and your own copyright statement or terms and conditions do not conflict
+     the conditions stated in the License including section 3.
+
+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 Flora License to your work
+
+To apply the Flora 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 Flora License, Version 1.1 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://floralicense.org/license/
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..2c7f2d6
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,3 @@
+Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Flora License, Version 1.1.
+Please, see the LICENSE.Flora file for Flora License, Version 1.1 terms and conditions.
diff --git a/daemon/CMakeList.txt b/daemon/CMakeList.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/org.tizen.tizen-things-daemon.manifest b/org.tizen.tizen-things-daemon.manifest
new file mode 100644 (file)
index 0000000..ca37499
--- /dev/null
@@ -0,0 +1,6 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
+
diff --git a/packaging/tizen-things-daemon.service b/packaging/tizen-things-daemon.service
new file mode 100644 (file)
index 0000000..8e8a064
--- /dev/null
@@ -0,0 +1,15 @@
+[Unit]
+Description=Things Daemon
+
+[Service]
+Type=idle
+SmackProcessLabel=System
+ExecStart=/usr/bin/tizen-things-daemon
+Restart=on-failure
+RestartSec=0
+NonBlocking=yes
+KillMode=process
+TimeoutStopSec=5
+
+[Install]
+WantedBy=multi-user.target
index e69de29..d8f63dd 100644 (file)
@@ -0,0 +1,86 @@
+%define P_NAME tizen-things-daemon
+%define APP_LABEL "Tizen Things Daemon"
+%define ORG_PREFIX org.tizen
+
+Name:       %{ORG_PREFIX}.%{P_NAME}
+%define alias %{name}
+Summary:    IoTivity Application
+Group:      Applications/Core Applications
+Version:    0.0.1
+Release:    1
+License:    Flora-1.1
+Provides:   %{name} = %{version}-%{release}
+Source0:    %{name}-%{version}.tar.gz
+Source1:       %{P_NAME}.service
+
+BuildRequires: cmake
+BuildRequires: edje-bin
+BuildRequires: gettext
+
+BuildRequires: pkgconfig(capi-appfw-service-application)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(libtzplatform-config)
+
+%description
+Tizen Things daemon and applications
+
+%prep
+%setup -q
+
+%build
+
+%define _bin_dir /usr/bin
+%define _pkg_dir %{TZ_SYS_RO_APP}/%{alias}
+%define _pkg_shared_dir %{_pkg_dir}/shared
+%define _pkg_data_dir %{_pkg_dir}/data
+%define _pkg_rw_data_dir /home/owner/apps_rw/%{alias}/data
+%define _pkg_res_dir %{_pkg_dir}/res
+%define _sys_icons_dir %{_pkg_shared_dir}/res
+%define _sys_packages_dir %{TZ_SYS_RO_PACKAGES}
+%define _sys_license_dir %{TZ_SYS_SHARE}/license
+
+export CFLAGS="$CFLAGS -DTIZEN_BUILD_TARGET"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_BUILD_TARGET"
+export FFLAGS="$FFLAGS -DTIZEN_BUILD_TARGET"
+
+cmake . -DP_NAME=%{P_NAME} \
+       -DORG_PREFIX=%{ORG_PREFIX} \
+       -DAPP_LABEL=%{APP_LABEL} \
+       -DINSTALL_PREFIX=%{_pkg_dir} \
+       -DINSTALL_OWNER_DATADIR=%{_pkg_rw_data_dir} \
+       -DINSTALL_RESDIR=%{_pkg_res_dir} \
+       -DSYS_ICONS_DIR=%{_sys_icons_dir} \
+       -DSYS_PACKAGES_DIR=%{_sys_packages_dir}
+make %{?jobs:-j%jobs}
+
+%install
+%make_install
+
+%define tizen_sign 1
+%define tizen_sign_base %{_pkg_dir}
+%define tizen_sign_level platform
+%define tizen_author_sign 1
+%define tizen_dist_sign 1
+
+mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
+install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/%{P_NAME}.service
+%install_service multi-user.target.wants %{P_NAME}.service
+
+%post
+/sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest %{alias}.manifest
+%license LICENSE.Flora NOTICE
+%defattr(-,root,root,-)
+
+%{_unitdir}/%{P_NAME}.service
+%{_unitdir}/multi-user.target.wants/%{P_NAME}.service
+
+%{_bin_dir}/tizen-things-daemon
+%{_pkg_dir}/bin/ttd-system-info
+%{_sys_packages_dir}/%{alias}.xml
diff --git a/tizen-things-daemon.xml b/tizen-things-daemon.xml
new file mode 100644 (file)
index 0000000..eaa2e89
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="4.0" package="@ORG_PREFIX@.@PROJECT_NAME@" version="0.0.1">
+    <profile name="mobile"/>
+    <author email="junkyu.han@samsung.com" href="www.samsung.com">Junkyu Han</author>
+    <service-application appid="@ORG_PREFIX@.@PROJECT_NAME@.system-info" exec="ttd-system-info" multiple="false" nodisplay="true" taskmanage="false" type="capp">
+        <label>org.tizen.tizen-things-daemon.system-info</label>
+    </service-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/network.get</privilege>
+               <privilege>http://tizen.org/privilege/internet</privilege>
+    </privileges>
+</manifest>
+
diff --git a/tizen-things-daemon/CMakeLists.txt b/tizen-things-daemon/CMakeLists.txt
new file mode 100644 (file)
index 0000000..53602d5
--- /dev/null
@@ -0,0 +1,13 @@
+SET(DAEMON tizen-things-daemon)
+
+FILE(GLOB daemon_source
+       ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c
+)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
+
+ADD_EXECUTABLE(${DAEMON} ${daemon_source})
+TARGET_LINK_LIBRARIES(${DAEMON} ${pkgs_LDFLAGS} "-pie -lm")
+
+# Install
+INSTALL(TARGETS ${DAEMON} DESTINATION /usr/bin)
diff --git a/tizen-things-daemon/inc/log.h b/tizen-things-daemon/inc/log.h
new file mode 100644 (file)
index 0000000..99a0497
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT 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 __TT_DAEMON_LOG_H__
+#define __TT_DAEMON_LOG_H__
+
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "TTS_D"
+
+#if !defined(_V)
+#define _V(fmt, arg...) log_print(DLOG_VERBOSE, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_D)
+#define _D(fmt, arg...) log_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_I)
+#define _I(fmt, arg...) log_print(DLOG_INFO, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_W)
+#define _W(fmt, arg...) log_print(DLOG_WARN, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_E)
+#define _E(fmt, arg...) log_print(DLOG_ERROR, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#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; \
+       } \
+}
+
+typedef enum {
+       LOG_TYPE_DLOG = 0,
+       LOG_TYPE_FILE,
+       LOG_TYPE_ALL,
+} log_type;
+
+int log_print(log_priority prio, const char *tag, const char *fmt, ...);
+int log_type_set(log_type type);
+void log_file_close(void);
+
+#endif /* __TT_DAEMON_LOG_H__ */
diff --git a/tizen-things-daemon/inc/ttd-queue.h b/tizen-things-daemon/inc/ttd-queue.h
new file mode 100644 (file)
index 0000000..f6fc108
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT 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 __TT_DAEMON_QUEUE_H__
+#define __TT_DAEMON_QUEUE_H__
+
+typedef enum {
+       TTD_QUEUE_TYPE_C2D,
+       TTD_QUEUE_TYPE_D2C,
+       TTD_QUEUE_TYPE_D2W,
+       TTD_QUEUE_TYPE_W2D,
+} ttd_queue_type_e;
+
+int ttd_queue_fini(void);
+int ttd_queue_init(void);
+int ttd_queue_push(ttd_queue_type_e type, void *data);
+int ttd_queue_pop(ttd_queue_type_e type, void **data);
+
+#endif /* __TT_DAEMON_QUEUE_H__ */
diff --git a/tizen-things-daemon/inc/ttd-status.h b/tizen-things-daemon/inc/ttd-status.h
new file mode 100644 (file)
index 0000000..2b9641d
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT 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 __TT_DAEMON_STATUS_H__
+#define __TT_DAEMON_STATUS_H__
+
+typedef enum {
+       TTD_STATUS_NONE,
+       TTD_STATUS_READY,
+       /* TBD */
+} ttd_status_e;
+
+
+ttd_status_e ttd_status_get(void);
+int ttd_status_set(ttd_status_e status);
+
+#endif /* __TT_DAEMON_STATUS_H__ */
diff --git a/tizen-things-daemon/inc/ttd-worker-handle.h b/tizen-things-daemon/inc/ttd-worker-handle.h
new file mode 100644 (file)
index 0000000..63de3f1
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT 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 __TT_DAEMON_WORKER_HANDLE_H__
+#define __TT_DAEMON_WORKER_HANDLE_H__
+
+int ttd_worker_launch(int worker_type, const char *cmd);
+
+#endif /* __TT_DAEMON_WORKER_HANDLE_H__ */
diff --git a/tizen-things-daemon/inc/ttd-worker-interface.h b/tizen-things-daemon/inc/ttd-worker-interface.h
new file mode 100644 (file)
index 0000000..1829d50
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT 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 __TT_DAEMON_WORKER_INTERFACE_H__
+#define __TT_DAEMON_WORKER_INTERFACE_H__
+
+int ttd_worker_interface_init(int *handle);
+int ttd_worker_interface_fini(int handle);
+
+#endif /* __TT_DAEMON_WORKER_INTERFACE_H__ */
\ No newline at end of file
diff --git a/tizen-things-daemon/src/log.c b/tizen-things-daemon/src/log.c
new file mode 100644 (file)
index 0000000..0856a3b
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <time.h>
+#include <dlog.h>
+#include "log.h"
+
+static FILE *log_fp = NULL;
+static log_type ltype = LOG_TYPE_DLOG;
+
+static const char log_prio_name[][DLOG_PRIO_MAX-1] = {
+       "UNKNOWN",
+       "DEFAULT", /**< Default */
+       "VERBOSE", /**< Verbose */
+       "DEBUG", /**< Debug */
+       "INFO", /**< Info */
+       "WARN", /**< Warning */
+       "ERROR", /**< Error */
+       "FATAL", /**< Fatal */
+       "SILENT" /**< Silent */
+};
+
+static inline char* getFormattedTime(void)
+{
+       struct timespec time_s;
+       struct tm *ptm;
+       static char res_time[40] = {0, };
+
+       if (0 == clock_gettime(CLOCK_REALTIME, &time_s)) {
+               ptm = localtime((const time_t *)&time_s.tv_sec);
+
+               // format : YY-MM-DD hh:mm:ss:uuuuuu
+               snprintf(res_time, sizeof(res_time),
+                       "%04d-%02d-%02d %02d:%02d:%02d:%06ld"
+                       , ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday
+                       , ptm->tm_hour, ptm->tm_min, ptm->tm_sec
+                       , time_s.tv_nsec);
+       }
+
+       return res_time;
+}
+
+static int __open_log_file(void)
+{
+       log_fp = fopen("/var/log/ttd.log", "a");
+       /* TODO : splits log file, if log file size is exceeded specified max size */
+       if (log_fp == NULL) {
+               dlog_print(DLOG_WARN, LOG_TAG, "%s\n", strerror(errno));
+               goto error;
+       }
+
+       return 0;
+
+error:
+       dlog_print(DLOG_WARN, LOG_TAG,
+               "error to use log file, so use dlog as log system\n");
+       ltype = LOG_TYPE_DLOG;
+
+       return -1;
+}
+
+int log_type_set(log_type type)
+{
+       ltype = type;
+       dlog_print(DLOG_DEBUG, LOG_TAG, "setting log type : [%d]\n", type);
+       switch (type) {
+       case LOG_TYPE_FILE:
+       case LOG_TYPE_ALL:
+               __open_log_file();
+               break;
+       case LOG_TYPE_DLOG: /* nothing to do */
+       default:
+               ltype = LOG_TYPE_DLOG;
+               break;
+       }
+       return 0;
+}
+
+void log_file_close(void)
+{
+       if (log_fp) {
+               fclose(log_fp);
+               log_fp = NULL;
+               dlog_print(DLOG_DEBUG, LOG_TAG, "close log file\n");
+       }
+
+       log_type_set(LOG_TYPE_DLOG);
+
+       return;
+}
+
+int log_print(log_priority prio, const char *tag, const char *fmt, ...)
+{
+       va_list ap;
+
+       switch (ltype) {
+       case LOG_TYPE_FILE:
+               if (log_fp) {
+                       va_start(ap, fmt);
+                       fprintf(log_fp, "[%s] [%s]", getFormattedTime(), log_prio_name[prio]);
+                       vfprintf(log_fp, fmt, ap);
+                       va_end(ap);
+                       fflush(log_fp);
+               }
+               break;
+       case LOG_TYPE_ALL:
+               va_start(ap, fmt);
+               if (log_fp) {
+                       fprintf(log_fp, "[%s] [%s]", getFormattedTime(), log_prio_name[prio]);
+                       vfprintf(log_fp, fmt, ap);
+               }
+               dlog_vprint(prio, tag, fmt, ap);
+               va_end(ap);
+
+               if (log_fp)
+                       fflush(log_fp);
+               break;
+       case LOG_TYPE_DLOG:
+       default:
+               va_start(ap, fmt);
+               dlog_vprint(prio, tag, fmt, ap);
+               va_end(ap);
+               break;
+       }
+       return 0;
+}
diff --git a/tizen-things-daemon/src/tizen-things-daemon.c b/tizen-things-daemon/src/tizen-things-daemon.c
new file mode 100644 (file)
index 0000000..d422030
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <glib.h>
+#include <glib-unix.h>
+#include "log.h"
+#include "ttd-status.h"
+#include "ttd-queue.h"
+
+typedef struct __ttd_data {
+       GMainLoop *mainloop;
+} ttd_data;
+
+static unsigned long long _get_monotonic_time(void)
+{
+       struct timespec ts;
+       int result;
+
+       result = clock_gettime(CLOCK_MONOTONIC, &ts);
+
+       if (result != 0) {
+               _E("failed to get monotonic time");
+               return 0;
+       }
+
+       return (((unsigned long long) ts.tv_sec) * 1000000) + (ts.tv_nsec / 1000);
+}
+
+static gboolean _handle_sigint(gpointer data)
+{
+       ttd_data *d_data = data;
+
+       _I("SIGINT received");
+
+       if (d_data && d_data->mainloop)
+               g_main_loop_quit(d_data->mainloop);
+
+       return FALSE;
+}
+
+static gboolean _handle_sigterm(gpointer data)
+{
+       ttd_data *d_data = data;
+
+       _I("SIGTERM received");
+
+       if (d_data && d_data->mainloop)
+               g_main_loop_quit(d_data->mainloop);
+
+       return FALSE;
+}
+
+int main(int argc, char* argv[])
+{
+       ttd_data *d_data = NULL;
+       unsigned long long start = 0;
+
+       start = _get_monotonic_time();
+
+       ttd_status_set(TTD_STATUS_NONE);
+       d_data = calloc(1, sizeof(ttd_data));
+
+       log_type_set(LOG_TYPE_DLOG);
+       d_data->mainloop = g_main_loop_new(NULL, FALSE);
+
+       /* TODO : prepare to start daemon */
+       ttd_queue_init();
+
+       /*                          */
+
+       g_unix_signal_add(SIGINT, _handle_sigint, d_data);
+       g_unix_signal_add(SIGTERM, _handle_sigterm, d_data);
+
+       ttd_status_set(TTD_STATUS_READY);
+       //sd_notify(0, "READY=1");
+       _D("[delay] start-to-ready - %.3lf(ms)",
+               (double)(_get_monotonic_time()- start)/1000);
+       g_main_loop_run(d_data->mainloop);
+
+       g_main_loop_unref(d_data->mainloop);
+       d_data->mainloop = NULL;
+
+       ttd_queue_fini();
+       log_file_close();
+       ttd_status_set(TTD_STATUS_NONE);
+       free(d_data);
+
+       _D("daemon lifetime - %.3lf(ms)",
+               (double)(_get_monotonic_time()- start)/1000);
+
+       return 0;
+}
\ No newline at end of file
diff --git a/tizen-things-daemon/src/ttd-queue.c b/tizen-things-daemon/src/ttd-queue.c
new file mode 100644 (file)
index 0000000..43e6838
--- /dev/null
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <glib.h>
+#include <stdlib.h>
+#include "log.h"
+#include "ttd-queue.h"
+
+static GAsyncQueue *queue_c2d = NULL;
+static GAsyncQueue *queue_d2c = NULL;
+static GAsyncQueue *queue_d2w = NULL;
+static GAsyncQueue *queue_w2d = NULL;
+
+static void _c2d_queue_item_free(gpointer data)
+{
+       /* TODO */
+       free(data);
+}
+
+static void _d2c_queue_item_free(gpointer data)
+{
+       /* TODO */
+       free(data);
+}
+
+static void _d2w_queue_item_free(gpointer data)
+{
+       /* TODO */
+       free(data);
+}
+
+static void _w2d_queue_item_free(gpointer data)
+{
+       /* TODO */
+       free(data);
+}
+
+int ttd_queue_init(void)
+{
+       queue_c2d = g_async_queue_new_full(_c2d_queue_item_free);
+       queue_d2c = g_async_queue_new_full(_d2c_queue_item_free);
+       queue_d2w = g_async_queue_new_full(_d2w_queue_item_free);
+       queue_w2d = g_async_queue_new_full(_w2d_queue_item_free);
+
+       if (!(queue_c2d && queue_d2c && queue_d2w && queue_w2d)) {
+               _E("failed to create queue - c2d[%p], d2c[%p], d2w[%p], w2d[%p]",
+                       queue_c2d, queue_d2c, queue_d2w, queue_w2d);
+               return -1;
+       }
+
+       return 0;
+}
+
+int ttd_queue_fini(void)
+{
+       if (queue_c2d) {
+                       g_async_queue_unref(queue_c2d);
+                       queue_c2d = NULL;
+       }
+
+       if (queue_d2c) {
+                       g_async_queue_unref(queue_d2c);
+                       queue_d2c = NULL;
+       }
+
+       if (queue_d2w) {
+                       g_async_queue_unref(queue_d2w);
+                       queue_d2w = NULL;
+       }
+
+       if (queue_w2d) {
+                       g_async_queue_unref(queue_w2d);
+                       queue_w2d = NULL;
+       }
+
+       return 0;
+}
+
+int ttd_queue_push(ttd_queue_type_e type, void *data)
+{
+       GAsyncQueue *queue = NULL;
+
+       if (data == NULL) {
+               _E("data is NULL");
+               return -1;
+       }
+
+       switch (type) {
+       case TTD_QUEUE_TYPE_C2D:
+               if (!queue_c2d) {
+                       _E("queue_c2d is not initialized yet");
+                       return -1;
+               }
+               queue = queue_c2d;
+               break;
+       case TTD_QUEUE_TYPE_D2C:
+               if (!queue_d2c) {
+                       _E("queue_d2c is not initialized yet");
+                       return -1;
+               }
+               queue = queue_d2c;
+               break;
+       case TTD_QUEUE_TYPE_D2W:
+               if (!queue_d2w) {
+                       _E("queue_d2w is not initialized yet");
+                       return -1;
+               }
+               queue = queue_d2w;
+               break;
+       case TTD_QUEUE_TYPE_W2D:
+               if (!queue_w2d) {
+                       _E("queue_w2d is not initialized yet");
+                       return -1;
+               }
+               queue = queue_w2d;
+               break;
+       }
+       _V("pushing data[%p] to queue[type - %d]", data, type);
+       g_async_queue_push(queue, data);
+
+       return 0;
+}
+
+int ttd_queue_pop(ttd_queue_type_e type, void **data)
+{
+       GAsyncQueue *queue = NULL;
+       void *item = NULL;
+
+       if (data == NULL) {
+               _E("data is NULL");
+               return -1;
+       }
+
+       switch (type) {
+       case TTD_QUEUE_TYPE_C2D:
+               if (!queue_c2d) {
+                       _E("queue_c2d is not initialized yet");
+                       return -1;
+               }
+               queue = queue_c2d;
+               break;
+       case TTD_QUEUE_TYPE_D2C:
+               if (!queue_d2c) {
+                       _E("queue_d2c is not initialized yet");
+                       return -1;
+               }
+               queue = queue_d2c;
+               break;
+       case TTD_QUEUE_TYPE_D2W:
+               if (!queue_d2w) {
+                       _E("queue_d2w is not initialized yet");
+                       return -1;
+               }
+               queue = queue_d2w;
+               break;
+       case TTD_QUEUE_TYPE_W2D:
+               if (!queue_w2d) {
+                       _E("queue_w2d is not initialized yet");
+                       return -1;
+               }
+               queue = queue_w2d;
+               break;
+       }
+
+       item = g_async_queue_pop(queue);
+       *data = item;
+
+       return 0;
+}
diff --git a/tizen-things-daemon/src/ttd-status.c b/tizen-things-daemon/src/ttd-status.c
new file mode 100644 (file)
index 0000000..1a2cee5
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "log.h"
+#include "ttd-status.h"
+
+static ttd_status_e g_ttd_status = TTD_STATUS_NONE;
+
+ttd_status_e ttd_status_get(void)
+{
+       return g_ttd_status;
+}
+
+int ttd_status_set(ttd_status_e status)
+{
+       if (1) {/* TODO : condition */
+               _D("TTD status is changed from %d to %d", g_ttd_status, status);
+               g_ttd_status = status;
+       } else
+               return -1;
+
+       return 0;
+}
diff --git a/tizen-things-daemon/src/ttd-worker-handle.c b/tizen-things-daemon/src/ttd-worker-handle.c
new file mode 100644 (file)
index 0000000..3160e18
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+int ttd_worker_launch(int worker_type, const char *cmd)
+{
+       return 0;
+}
\ No newline at end of file
diff --git a/tizen-things-daemon/src/ttd-worker-interface.c b/tizen-things-daemon/src/ttd-worker-interface.c
new file mode 100644 (file)
index 0000000..c373cc9
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/* handle should be redefined as a data struct */
+int ttd_worker_interface_init(int *handle)
+{
+       /* TODO */
+       // DBUS or file or IPC or.....which one?
+       return 0;
+}
+
+int ttd_worker_interface_fini(int handle)
+{
+       return 0;
+}
diff --git a/workers/CMakeList.txt b/workers/CMakeList.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/workers/CMakeLists.txt b/workers/CMakeLists.txt
new file mode 100644 (file)
index 0000000..aab59ea
--- /dev/null
@@ -0,0 +1,2 @@
+ADD_SUBDIRECTORY(system-info)
+
diff --git a/workers/system-info/CMakeList.txt b/workers/system-info/CMakeList.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/workers/system-info/CMakeLists.txt b/workers/system-info/CMakeLists.txt
new file mode 100644 (file)
index 0000000..11d7324
--- /dev/null
@@ -0,0 +1,14 @@
+SET(SYS_INFO ttd-system-info)
+
+FILE(GLOB SRCS
+       ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c
+)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
+
+
+ADD_EXECUTABLE(${SYS_INFO} ${SRCS})
+TARGET_LINK_LIBRARIES(${SYS_INFO} ${pkgs_LDFLAGS} "-pie -lm")
+
+#Install
+INSTALL(TARGETS ${SYS_INFO} DESTINATION ${INSTALL_EXEC_PREFIX})
diff --git a/workers/system-info/inc/controller.h b/workers/system-info/inc/controller.h
new file mode 100644 (file)
index 0000000..7850148
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Contact: Junkyu Han <junkyu.han@samsung.com>
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT 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 __TTS_SYSTEM_INFO_CONTROLLER_H__
+#define __TTS_SYSTEM_INFO_CONTROLLER_H__
+
+#endif /* __TTS_SYSTEM_INFO_CONTROLLER_H__ */
diff --git a/workers/system-info/inc/log.h b/workers/system-info/inc/log.h
new file mode 100644 (file)
index 0000000..47dcc2c
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT 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 __TT_DAEMON_LOG_H__
+#define __TT_DAEMON_LOG_H__
+
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "TTD_SYS_INFO"
+
+#if !defined(_V)
+#define _V(fmt, arg...) log_print(DLOG_VERBOSE, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_D)
+#define _D(fmt, arg...) log_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_I)
+#define _I(fmt, arg...) log_print(DLOG_INFO, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_W)
+#define _W(fmt, arg...) log_print(DLOG_WARN, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#if !defined(_E)
+#define _E(fmt, arg...) log_print(DLOG_ERROR, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#endif
+
+#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; \
+       } \
+}
+
+typedef enum {
+       LOG_TYPE_DLOG = 0,
+       LOG_TYPE_FILE,
+       LOG_TYPE_ALL,
+} log_type;
+
+int log_print(log_priority prio, const char *tag, const char *fmt, ...);
+int log_type_set(log_type type);
+void log_file_close(void);
+
+#endif /* __TT_DAEMON_LOG_H__ */
diff --git a/workers/system-info/src/controller.c b/workers/system-info/src/controller.c
new file mode 100644 (file)
index 0000000..1a7e6a6
--- /dev/null
@@ -0,0 +1,2528 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Contact: Junkyu Han <junkyu.han@samsung.com>
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Ecore.h>
+#include <tizen.h>
+#include <service_app.h>
+#include <system_info.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "log.h"
+#include "controller.h"
+
+typedef struct app_data_s {
+       Ecore_Timer *getter_timer;
+} app_data;
+
+static Eina_Bool __getting_system_info_cb(void *data);
+static void __print_error_reason(int ret);
+
+static bool service_app_create(void *data)
+{
+       app_data *ad = data;
+
+       ad->getter_timer = ecore_timer_add(3, __getting_system_info_cb, ad);
+       if (!ad->getter_timer) {
+               _E("Failed to add Getting System Info Timer");
+               return false;
+       }
+
+       return true;
+}
+
+static void service_app_terminate(void *data)
+{
+       app_data *ad = (app_data *)data;
+
+       if (ad->getter_timer)
+               ecore_timer_del(ad->getter_timer);
+
+       free(ad);
+}
+
+static void service_app_control(app_control_h app_control, void *data)
+{
+    /* APP_CONTROL */
+}
+
+static void service_app_lang_changed(app_event_info_h event_info, void *user_data)
+{
+       /*APP_EVENT_LANGUAGE_CHANGED*/
+}
+
+static void service_app_region_changed(app_event_info_h event_info, void *user_data)
+{
+       /*APP_EVENT_REGION_FORMAT_CHANGED*/
+}
+
+static void service_app_low_battery(app_event_info_h event_info, void *user_data)
+{
+       /*APP_EVENT_LOW_BATTERY*/
+}
+
+static void service_app_low_memory(app_event_info_h event_info, void *user_data)
+{
+       /*APP_EVENT_LOW_MEMORY*/
+}
+
+int main(int argc, char* argv[])
+{
+       app_data *ad = NULL;
+       int ret = 0;
+       service_app_lifecycle_callback_s event_callback;
+       app_event_handler_h handlers[5] = {NULL, };
+
+       ad = calloc(1, sizeof(app_data));
+       retv_if(!ad, -1);
+
+       event_callback.create = service_app_create;
+       event_callback.terminate = service_app_terminate;
+       event_callback.app_control = service_app_control;
+
+       service_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, service_app_low_battery, &ad);
+       service_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, service_app_low_memory, &ad);
+       service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad);
+       service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad);
+
+       ret = service_app_main(argc, argv, &event_callback, ad);
+
+       return ret;
+}
+
+static Eina_Bool __getting_system_info_cb(void *data)
+{
+       _D("Getting System Information");
+
+       char *str_value;
+       bool bool_value;
+       int int_value;
+       int ret;
+       int count = 0;
+       FILE *file;
+       time_t ltime;
+       struct tm datetime;
+
+       if((file = fopen("/tmp/info.txt", "a+")) == NULL)
+               _E("Failed to oepn log file");
+
+       if (time(&ltime) == -1)
+               _E("Failed to get time");
+
+       localtime_r(&ltime, &datetime);
+       _D("---------------------------------------------------------------------------------");
+       _D("Current time: %d-%d-%d. %d:%d:%d", datetime.tm_year + 1900, datetime.tm_mon + 1, datetime.tm_mday, datetime.tm_hour, datetime.tm_min, datetime.tm_sec);
+       _D("---------------------------------------------------------------------------------");
+       fprintf(file, "-------------------------------------------------------------------------------\n");
+       fprintf(file, "Current time: %d-%d-%d. %d:%d:%d\n", datetime.tm_year + 1900, datetime.tm_mon + 1, datetime.tm_mday, datetime.tm_hour, datetime.tm_min, datetime.tm_sec);
+       fprintf(file, "-------------------------------------------------------------------------------\n");
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/camera", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Camera supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Camera Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Camera Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/camera.back", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Back-facing Camera supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Back-facing Camera Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Back-facing Camera Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/camera.back.flash", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Back-facing Camera with Flash supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Back-facing Camera with Flash Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Back-facing Camera with Flash Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/camera.front", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Front Camera with supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Front Camera Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Front Camera Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/camera.front.flash", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is front-facing Camera with Flash supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is front-facing Camera with Flash Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is front-facing Camera with Flash Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/account", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Account Manager API supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Account Manager API Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Account Manager API Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/account.sync", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Sync Manager API supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Sync Manager API Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Sync Manager API Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/app_history", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Application history feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Application history feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Application history feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/battery", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is battery supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is battery Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is battery Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/consumer_ir", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Consumer IR supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Consumer IR Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Consumer IR Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/contextual_trigger", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Contextual Trigger supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Contextual Trigger Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Contextual Trigger Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/database.encryption", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Database Encryption supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Database Encryption Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Database Encryption Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/download", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Download API supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Download API Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Download API Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/fido.uaf", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is FIDO UAF client API supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is FIDO UAF client Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is FIDO UAF client Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/fmradio", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is FM Radio supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is FM Radio Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is FM Radio Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/graphics.acceleration", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Graphics H/W Acceleration supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Graphics H/W Acceleration Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Graphics H/W Acceleration Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/humanactivitymonitor", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Human Activity Monitor Sensor supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Human Activity Monitor Sensor Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Human Activity Monitor Sensor Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/input.keyboard", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Built-in Keyboard supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Built-in Keyboard Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Built-in Keyboard Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/input.keyboard.layout", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What keyboard layout is supported");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What Keyboard Layout is Supported? %s", str_value);
+               fprintf(file, "What Keyboard Layout is Supported? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/input.rotating_bezel", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Rotating Bezel feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Rotating Bezel feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Rotating Bezel feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/iot.ocf", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OCF F/W supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OCF F/W Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OCF F/W Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/led", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is LED supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is LED Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is LED Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/location", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Location Positioning supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Location Positioning Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Location Positioning Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/location.batch", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is GPS batch feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is GPS batch feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is GPS batch feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/location.geofence", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Geofence feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Geofence feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Geofence feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/location.gps", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Global Positioning System supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Global Location System Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Global Location System Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/location.gps.satellite", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Satellite information supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Satellite information Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Satellite information Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/location.wps", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Wifi-based Positioning System supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Wifi-base Positioning system Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Wifi-base Positioning system Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/maps", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is map service feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Map service feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Map service feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/media.audio_recording", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Audio Recording feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Audio Recording feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Audio Recording feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/media.image_capture", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Image Capture feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Image Capture feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Image Capture feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }       
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/media.video_recording", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Video Recording feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Video Recording feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Video Recording feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/microphone", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Microphone supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Microphone Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Microphone Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/multimedia.transcoder", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Multimedia Transcoder supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Multimedia Transcoder Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Multimedia Transcoder Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/multi_point_touch.pinch_zoom", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Pinch Zoom gesture supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Pinch Zoom Gesture Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Pinch Zoom Gesture Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/feature/multi_point_touch.point_count", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [How many Touch Points are supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("How many Touch Points are Supported? %d", int_value);
+               fprintf(file, "How many Touch Points are Supported? %d\n", int_value);
+       }       
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.call", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Hands-free Profile supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Hands-free Profile Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Hands-free Profile Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.controller", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Audio Video Remote Contoller supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Audio Video Remote Contoller Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Audio Video Remote Contoller Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.media", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Advanced Audio Distribute Profile supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else
+               _D("Is Bluetooth Advanced Audio Distribute Profile Supported? %s", bool_value ? "Supported" : "Not Supported");
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.health", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Health Device Profile supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else
+               _D("Is Bluetooth Health Device Profile Supported? %s", bool_value ? "Supported" : "Not Supported");
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.hid", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Human Input Device supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Human Input Device Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Human Input Device Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+#if 0
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.hid.device", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Human Interface Device supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Human Interface Device Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Human Interface Device Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+#endif
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Low Energy supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Low Energy Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Low Energy Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.opp", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Object Push Profile supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Object Push Profile Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Object Push Profile Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.phonebook.client", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Bluetooth Phone Book Access client feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Bluetooth Phone Book Access client feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Bluetooth Phone Book Access client feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }       
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.ethernet", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Ethernet supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Ethernet Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Ethernet Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.internet", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Internet supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Internet Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Internet Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.mtp", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Media Transfer Protocol supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Media Transfer Protocol Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Media Transfer Protocol Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.net_proxy", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Net Proxy supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Net Proxy Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Net Proxy Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.nfc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is NFC supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Near Field Communication Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Near Field Communication Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.nfc.card_emulation", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is NFC Card Reader supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is NFC Card Reader Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is NFC Card Reader Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.nfc.card_emulation.hce", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is HCE Card Emulation feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is HCE Card Emulation feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is HCE Card Emulation feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.nfc.p2p", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is P2P API supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is P2P API(with NFC) Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is P2P API(with NFC) Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.nfc.reserved_push", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is NFC Reserved push feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is NFC Reserved push feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is NFC Reserved push feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.nfc.tag", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Tag API with NFC supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Tag API with NFC Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Tag API with NFC Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.push", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is IP Push Service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is IP Push Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is IP Push Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.secure_element", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Secure Element supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Secure Element Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Secure Element Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.secure_element.ese", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is eSE Secure Element supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is eSE Secure Element Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is eSE Secure Element Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.secure_element.uicc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is UICC Secure Element supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is UICC Secure Element Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is UICC Secure Element Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.service_discovery.dnssd", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is DNSSD supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is DNS-base Service Discovery Feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is DNS-base Service Discovery Feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.service_discovery.ssdp", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is SSDP supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Simple Service Discovery Protocol Feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Simple Service Discovery Protocol Feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Telphony supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Telephony Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Telephony Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.mms", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is MMS supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is MMS Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is MMS Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.cdma", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is CDMA service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is CDMA Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is CDMA Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.edge", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is EDGE service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is EDGE Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is EDGE Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.gprs", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is GPRS service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is GPRS Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is GPRS Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.gsm", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is GSM service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is GSM Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is GSM Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.hsdpa", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is HSDPA service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is HSDPA Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is HSDPA Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.hspa", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is HSPA service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is HSPA Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is HSPA Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.lte", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is LTE service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is LTE Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is LTE Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.service.umts", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is UMTS service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is UMTS Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is UMTS Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.sms", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is SMS service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is SMS Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is SMS Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.telephony.sms.cbs", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is CBS for SMS service supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Cell Broadcast Service for SMS Service Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Cell Broadcast Service for SMS Service Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.tethering", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Tethering supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Tethering Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Tethering Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.tethering.bluetooth", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Tethering over bluetooth supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Tethering over bluetooth Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Tethering over bluetooth Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.tethering.usb", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Tethering over USB connection supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Tethering over USB connection Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Tethering over USB connection Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.tethering.wifi", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is Tethering over WiFi connection supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Tethering over WiFi connection Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Tethering over WiFi connection Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.vpn", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is VPN supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Virtual Private Network Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is Virtual Private Network Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.wifi", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is API which require WiFi supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is API which require WiFi Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is API which require WiFi Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.wifi.direct", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is WiFi Direct supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is WiFi Direct Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is WiFi Direct Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.wifi.direct.display", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is WiFi Direct display feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is WiFi Direct display feature Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is WiFi Direct display feature Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.wifi.direct.service_discovery", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is WiFi Direct Service Discovery feature supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is WiFi Direct Service Discovery Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is WiFi Direct Service Discovery Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/network.wifi.tdls", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is WiFi TDLS supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is WiFi Tunneled Direct Link Setup Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is WiFi Tunneled Direct Link Setup Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/oauth2", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OAuth 2.0 API supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OAuth 2.0 API Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OAuth 2.0 API Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OpenGL ES supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OpenGL ES Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OpenGL ES Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+#if 0
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/opengles.texture_format", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OpenGL ES or texture format supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OpenGL ES or texture format Supported? %s", str_value);
+               fprintf(file, "Is OpenGL ES or texture format Supported? %s\n", str_value);
+       }
+       free(str_value);
+#endif
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.texture_format.3dc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is 3DC texture supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is 3DC texture Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is 3DC texture Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.texture_format.atc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is ATC texture supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is ATC texture Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is ATC texture Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.texture_format.etc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is ETC texture supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is ETC texture Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is ETC texture Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.texture_format.ptc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is PTC texture supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is PTC texture Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is PTC texture Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.texture_format.pvrtc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is PVRTC texture supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is PVRTC texture Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is PVRTC texture Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.texture_format.utc", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is UTC texture supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is UTC texture Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is UTC texture Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.version.1_1", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OpenGL ES version 1.1 supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OpenGL ES version 1.1 Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OpenGL ES version 1.1 Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.version.2_0", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OpenGL ES version 2.0 supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OpenGL ES version 2.0 Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OpenGL ES version 2.0 Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.version.3_0", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OpenGL ES version 3.0 supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OpenGL ES version 3.0 Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OpenGL ES version 3.0 Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.version.3_1", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OpenGL ES version 3.1 supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OpenGL ES version 3.1 Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OpenGL ES version 3.1 Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/opengles.version.3_2", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is OpenGL ES version 3.2 supported]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is OpenGL ES version 3.2 Supported? %s", bool_value ? "Supported" : "Not Supported");
+               fprintf(file, "Is OpenGL ES version 3.2 Supported? %s\n", bool_value ? "Supported" : "Not Supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/platform.core.api.version", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What version of the Tizen Core API is supported ]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What version of the Tizen Core API is Supported? %s", str_value);
+               fprintf(file, "What version of the Tizen Core API is Supported? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/platform.core.cpu.arch", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Which CPU architecture?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Which CPU architecture? %s", str_value);
+               fprintf(file, "Which CPU architecture? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.core.cpu.arch.armv6", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Does this device run on the ARMv6 CPU Architecture]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Does this device run on the ARMv6 CPU architecture? %s", bool_value ? "YES" : "NO");
+               fprintf(file, "Does this device run on the ARMv6 CPU architecture? %s\n", bool_value ? "YES" : "NO");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.core.cpu.arch.armv7", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Does this device run on the ARMv7 CPU Architecture]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Does this device run on the ARMv7 CPU architecture? %s", bool_value ? "YES" : "NO");
+               fprintf(file, "Does this device run on the ARMv7 CPU architecture? %s\n", bool_value ? "YES" : "NO");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.core.cpu.arch.x86", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Does this device run on the x86 CPU Architecture]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Does this device run on the x86 CPU architecture? %s", bool_value ? "YES" : "NO");
+               fprintf(file, "Does this device run on the x86 CPU architecture? %s\n", bool_value ? "YES" : "NO");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/feature/platform.core.cpu.frequency", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Getting Frequency]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Frequency? %d", int_value);
+               fprintf(file, "Frequency? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/platform.core.fpu.arch", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Which FPU architecture?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Which FPU architecture? %s", str_value);
+               fprintf(file, "Which FPU architecture? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.core.fpu.arch.sse3", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Does this device run on the SSSE3 FPU Architecture]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Does this device run on the SSE3 FPU architecture? %s", bool_value ? "YES" : "NO");
+               fprintf(file, "Does this device run on the SSE3 FPU architecture? %s\n", bool_value ? "YES" : "NO");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.core.fpu.arch.ssse3", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Does this device run on the SSSSE3 FPU Architecture]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Does this device run on the SSSE3 FPU architecture? %s", bool_value ? "YES" : "NO");
+               fprintf(file, "Does this device run on the SSSE3 FPU architecture? %s\n", bool_value ? "YES" : "NO");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.core.fpu.arch.vfpv2", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Does this device run on the VFPV2 FPU Architecture]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Does this device run on the VFPV2 FPU architecture? %s", bool_value ? "YES" : "NO");
+               fprintf(file, "Does this device run on the VFPV2 FPU architecture? %s\n", bool_value ? "YES" : "NO");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.core.fpu.arch.vfpv3", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Does this device run on the VFPV3 FPU Architecture]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Does this device run on the VFPV3 FPU architecture? %s", bool_value ? "YES" : "NO");
+               fprintf(file, "Does this device run on the VFPV3 FPU architecture? %s\n", bool_value ? "YES" : "NO");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/platform.native.api.version", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Getting Native API version]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the version of Native API? %s", str_value);
+               fprintf(file, "What is the version of Native API? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/platform.native.osp_compatible", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the bada compatibility mode supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the bada compatibility mode supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the bada compatibility mode supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/platform.version", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Getting Platform version]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the version of Platform? %s", str_value);
+               fprintf(file, "What is the version of Platform? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/platform.version.name", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Getting Platform version name]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the version name of Platform? %s", str_value);
+               fprintf(file, "What is the version name of Platform? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/platform.web.api.version", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Getting Web API version]");
+       } else {
+               _D("What is the version of Web API? %s", str_value);
+               fprintf(file, "What is the version of Web API? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/feature/profile", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Getting Device Profile]");
+       } else {
+               _D("What is the profile of this device? %s", str_value);
+               fprintf(file, "What is the profile of this device? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the Display screen Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is Display Screen supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is Display Screen supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.always_on.high_color", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the High color AOD Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the High color Always On Display supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the High color Always On Display supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.always_on.low_bit_color", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the Low bit color AOD Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Low bit color Always On Display supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Low bit color Always On Display supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.auto_rotation", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the auto-rotation Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Auto Rotation supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Auto Rotation supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/feature/screen.bpp", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the number of bits per Pixel]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the number of bits per Pixel? %d", int_value);
+               fprintf(file, "What is the number of bits per Pixel? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.coordinate_system.size.large", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the Large screen size Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Large screen size supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Large screen size supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.coordinate_system.size.normal", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the Normal screen size Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Normal screen size supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Normal screen size supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/feature/screen.dpi", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the number of dots per inch?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the number of dots per inch? %d", int_value);
+               fprintf(file, "What is the number of dots per inch? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/feature/screen.height", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the height of the screen?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the height of the screen? %d", int_value);
+               fprintf(file, "What is the height of the screen? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.output.hdmi", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the HDMI output Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the HDMI output supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the HDMI output supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.output.rca", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the RCA output Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the RCA output supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the RCA output supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.shape.circle", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the circular screen Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the circular screen output supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the circular screen output supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.shape.rectangle", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the rectangular screen Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the rectangular screen output supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the rectangular screen output supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.all", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the any screen size Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Any screen size supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Any screen size supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.large", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the Large screen size Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Large screen size supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Large screen size supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal", &bool_value); // The Platform always returns false for this key
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the Normal screen size Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Normal screen size supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Normal screen size supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.240.400", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 240x400 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 240x400 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 240x400 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.320.320", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 320x320 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 320x320 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 320x320 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.320.480", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 320x480 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 320x480 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 320x480 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+#if 0
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.360.360", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 360x360 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 360x360 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 360x360 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+#endif
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.360.480", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 360x480 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 360x480 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 360x480 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.480.800", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 480x800 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 480x800 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 480x800 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.540.960", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 540x960 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 540x960 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 540x960 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.600.1024", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 600x1024 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 600x1024 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 600x1024 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.720.1280", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 720x1280 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 720x1280 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 720x1280 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/screen.size.normal.1080.1920", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the 1080x1920 resolution Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the 1080x1920 resolution supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the 1080x1920 resolution supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/feature/screen.width", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the width of the screen?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Width of the Screen? %d", int_value);
+               fprintf(file, "Is the Width of the Screen? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.accelerometer", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the acceleration sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Acceleration Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Acceleration Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.accelerometer.wakeup", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the wake-up operation by the acceleration sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Wake-up operation by the Acceleration Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Wake-up operation by the Acceleration Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.activity_recognition", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the activity recognition Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Activity Recognition supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Activity Recognition supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.barometer", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the barometer sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Barometer Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Barometer Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.barometer.wakeup", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the wake-up operation by the barometer sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Wake-up operation by the Barometer Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Wake-up operation by the Barometer Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.geomagnetic_rotation_vector", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the geomagnetic-based rotation vector sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Geomagnetic-based rotation vector Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Geomagnetic-based rotation vector Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.gesture_recognition", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the gesture recognition Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Gesture Recognition supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Gesture Recognition supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.gravity", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the gravity sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Gravity Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Gravity Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.gyroscope", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the gyroscope sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Gyroscope Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Gyroscope Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.gyroscope_rotation_vector", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the gyroscope rotation vector sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Gyroscope Rotation vector Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               printf("Is the Gyroscope Rotation vector Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.gyroscope.uncalibrated", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the uncalibrated gyroscope sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Uncalibrated Gyroscope Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Uncalibrated Gyroscope Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.heart_rate_monitor", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the heart rate monitor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Heart Rate Monitor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Heart Rate Monitor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.heart_rate_monitor.led_green", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the LED green sensor of the heart rate monitor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the LED green sensor of the Heart Rate Monitor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the LED green sensor of the Heart Rate Monitor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.heart_rate_monitor.led_ir", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the LED infrared sensor of the heart rate monitor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the LED Infrared sensor of the Heart Rate Monitor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the LED Infrared sensor of the Heart Rate Monitor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.heart_rate_monitor.led_red", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the LED red sensor of the heart rate monitor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the LED red sensor of the Heart Rate Monitor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the LED red sensor of the Heart Rate Monitor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.humidity", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the humidity sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Humidity Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Humidity Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.linear_acceleration", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the Linear Acceleration sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Linear Acceleration Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Linear Acceleration Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.magnetometer", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the magnetometer Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Magnetometer Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Magnetometer Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.magnetometer.uncalibrated", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the uncalibrated magnetometer Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Uncalibrated Magnetometer Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Uncalibrated Magnetometer Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.magnetometer.wakeup", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the wake-up operation by the magnetometer Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Wake-up operation by the Magnetometer Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Wake-up operation by the Magnetometer Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.pedometer", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the pedometer sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Pedometer Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Pedometer Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.photometer", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the photo(light) sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Photo(light) Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Photo(light) Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.photometer.wakeup", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the wake-up operation by the photo(light) sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Wake-up operation by the Photo(light) Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Wake-up operation by the Photo(light) Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.proximity", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the proximity sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Proximity Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Proximity Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.proximity.wakeup", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the wake-up operation by the proximity sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Wake-up operation by the Proximity Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Wake-up operation by the Proximity Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.rotation_vector", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the rotation vector sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Rotation vector Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Rotation vector Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.significant_motion", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the significant motion sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Significant Motion Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Significant Motion Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.sleep_monitor", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the sleep monitor sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Sleep Monitor Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Sleep Monitor Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.stress_monitor", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the stress monitor sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Stress Monitor Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Stress Monitor Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.temperature", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the temperature sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Temperature Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Temperature Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.tiltmeter", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the tiltmeter sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Tiltmeter Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Tiltmeter Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.tiltmeter.wakeup", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the wake-up operation by the tiltmeter sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Wake-up operation by the Tiltmeter Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Wake-up operation by the Tiltmeter Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.ultraviolet", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the ultraviolet sensor Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Ultraviolet Sensor supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Ultraviolet Sensor supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sensor.wrist_up", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the wrist up action Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the wrist up action supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the wrist up action supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/shell.appwidget", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the AppWidget Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the AppWidget supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the AppWidget supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/sip.voip", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the VoIP Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Void over Internet Protocol supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Void over Internet Protocol supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/speech.control", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the voice control Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Voice Control supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Voice Control supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/speech.recognition", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the speech recognition(STT) Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Speech Recognition(STT) supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Speech Recognition(STT) supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/speech.synthesis", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the speech synthesis(TTS) Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Speech Synthesis(TTS) supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Speech Synthesis(TTS) supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/systemsetting", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the system setting API Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the SystemSetting API supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the SystemSetting API supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/systemsetting.home_screen", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the way to change or get the picture on the homescreen Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Way to change or get the picture on the homescreen supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Way to change or get the picture on the homescreen supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/systemsetting.incoming_call", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the way to change or get the ringtone for incoming call Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Way to change or get the ringtone for incoming call supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Way to change or get the ringtone for incoming call supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/systemsetting.lock_screen", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the way to change or get the lockscreen wallpaper Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Way to change or get the Lockscreen Wallpaper supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Way to change or get the Lockscreen Wallpaper supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/systemsetting.notification_email", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the way to change or get the email notifications Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Way to change or get the email notifications supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Way to change or get the email notifications supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/usb.accessory", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the USB client mode Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the USB Client mode supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the USB Client mode supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/usb.host", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the USB host mode Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the USB Host mode supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the USB Host mode supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_detection", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the barcode detection feature Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Barcode Detection feature supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Barcode Detection feature supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_generation", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the barcode generation feature Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Barcode Generation feature supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Barcode Generation feature supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/vision.face_recognition", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the face recognition Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Face Recognition feature supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Face Recognition feature supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/vision.image_recognition", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the image recognition Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Image Recognition feature supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Image Recognition feature supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/vision.qrcode_generation", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the qrcode generation  Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Qrcode Generation supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Qrcode Generation supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/vision.qrcode_recognition", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the qrcode recognition  Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Qrcode recognition supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Qrcode recognition supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/web.ime", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the web ime Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Web IME supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Web IME supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_bool("http://tizen.org/feature/web.service", &bool_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [Is the web service Supported?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("Is the Web Service model supported? %s", bool_value ? "Supported" : "Not supported");
+               fprintf(file, "Is the Web Service model supported? %s\n", bool_value ? "Supported" : "Not supported");
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/build.date", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [When is the platform image build date?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("When is the platform image build date ? %s", str_value);
+               fprintf(file, "When is the platform image build date ? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/build.id", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the platform image build id?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the platform image Build Id? %s", str_value);
+               fprintf(file, "What is the platform image Build Id? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/build.string", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the platform image build information string?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the platform image Build Information string? %s", str_value);
+               fprintf(file, "What is the platform image Build Information string? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/build.time", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [When is the platform image build time?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("When is the platform image Build Time? %s", str_value);
+               fprintf(file, "When is the platform image Build Time? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/build.type", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the platform image build type?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the platform image Build Type? %s", str_value);
+               fprintf(file, "What is the platform image Build Type? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/build.variant", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the platform image variant release information?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the platform image variant release information? %s", str_value);
+               fprintf(file, "What is the platform image variant release information? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/build.release", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the platform image build version information ?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the platform image build version information? %s", str_value);
+               fprintf(file, "What is the platform image build version information? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/manufacturer", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the manufacturer name?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Manufacturer Name? %s", str_value);
+               fprintf(file, "What is the Manufacturer Name? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/model_name", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the device model name?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Device Model Name? %s", str_value);
+               fprintf(file, "What is the Device Model Name? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/platform.communication_processor", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the communication processor name?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Commuinication Processor Name? %s", str_value);
+               fprintf(file, "What is the Commuinication Processor Name? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/platform.name", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the platform name?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Platform Name? %s", str_value);
+               fprintf(file, "What is the Platform Name? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/platform.processor", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the processor name?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Processor Name? %s", str_value);
+               fprintf(file, "What is the Processor Name? %s\n", str_value);
+       }
+       free(str_value);
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/system/sound.media.volume.resolution.max", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the maximum sound volume level of media?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Maximum Sound Volume Level of Media? %d", int_value);
+               fprintf(file, "What is the Maximum Sound Volume Level of Media? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/system/sound.notification.volume.resolution.max", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the maximum sound volume level of notification?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Maximum Sound Volume Level of Notification? %d", int_value);
+               fprintf(file, "What is the Maximum Sound Volume Level of Notification? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/system/sound.ringtone.volume.resolution.max", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the maximum sound volume level of ringtone?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Maximum Sound Volume Level of Ringtone? %d", int_value);
+               fprintf(file, "What is the Maximum Sound Volume Level of Ringtone? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_int("http://tizen.org/system/sound.system.volume.resolution.max", &int_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [What is the maximum sound volume level of system?]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("What is the Maximum Sound Volume Level of System? %d", int_value);
+               fprintf(file, "What is the Maximum Sound Volume Level of System? %d\n", int_value);
+       }
+
+       //_D("==%d's call", ++count);
+       ret = system_info_get_platform_string("http://tizen.org/system/tizenid", &str_value);
+       if (ret != SYSTEM_INFO_ERROR_NONE) {
+               _E("Failed to get System Info [TizenID]");
+               __print_error_reason(ret);
+               return ECORE_CALLBACK_RENEW;
+       } else {
+               _D("TizenID: %s", str_value);
+               fprintf(file, "TizenID: %s\n", str_value);
+       }
+       free(str_value);
+
+       _D("");
+       fprintf(file, "\n");
+
+       fclose(file);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void __print_error_reason(int ret)
+{
+       switch (ret)
+       {
+       case SYSTEM_INFO_ERROR_INVALID_PARAMETER:
+               _E("Invalid Parameter");
+               break;
+       case SYSTEM_INFO_ERROR_IO_ERROR:
+               _E("IO Error");
+               break;
+       case SYSTEM_INFO_ERROR_PERMISSION_DENIED:
+               _E("Permission Denied");
+               break;
+       case SYSTEM_INFO_ERROR_NOT_SUPPORTED:
+               _E("Not Supported");
+               break;
+       default:
+               _E("Failure caused some other reaseon");
+               break;
+       }
+}
+
diff --git a/workers/system-info/src/log.c b/workers/system-info/src/log.c
new file mode 100644 (file)
index 0000000..0856a3b
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <time.h>
+#include <dlog.h>
+#include "log.h"
+
+static FILE *log_fp = NULL;
+static log_type ltype = LOG_TYPE_DLOG;
+
+static const char log_prio_name[][DLOG_PRIO_MAX-1] = {
+       "UNKNOWN",
+       "DEFAULT", /**< Default */
+       "VERBOSE", /**< Verbose */
+       "DEBUG", /**< Debug */
+       "INFO", /**< Info */
+       "WARN", /**< Warning */
+       "ERROR", /**< Error */
+       "FATAL", /**< Fatal */
+       "SILENT" /**< Silent */
+};
+
+static inline char* getFormattedTime(void)
+{
+       struct timespec time_s;
+       struct tm *ptm;
+       static char res_time[40] = {0, };
+
+       if (0 == clock_gettime(CLOCK_REALTIME, &time_s)) {
+               ptm = localtime((const time_t *)&time_s.tv_sec);
+
+               // format : YY-MM-DD hh:mm:ss:uuuuuu
+               snprintf(res_time, sizeof(res_time),
+                       "%04d-%02d-%02d %02d:%02d:%02d:%06ld"
+                       , ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday
+                       , ptm->tm_hour, ptm->tm_min, ptm->tm_sec
+                       , time_s.tv_nsec);
+       }
+
+       return res_time;
+}
+
+static int __open_log_file(void)
+{
+       log_fp = fopen("/var/log/ttd.log", "a");
+       /* TODO : splits log file, if log file size is exceeded specified max size */
+       if (log_fp == NULL) {
+               dlog_print(DLOG_WARN, LOG_TAG, "%s\n", strerror(errno));
+               goto error;
+       }
+
+       return 0;
+
+error:
+       dlog_print(DLOG_WARN, LOG_TAG,
+               "error to use log file, so use dlog as log system\n");
+       ltype = LOG_TYPE_DLOG;
+
+       return -1;
+}
+
+int log_type_set(log_type type)
+{
+       ltype = type;
+       dlog_print(DLOG_DEBUG, LOG_TAG, "setting log type : [%d]\n", type);
+       switch (type) {
+       case LOG_TYPE_FILE:
+       case LOG_TYPE_ALL:
+               __open_log_file();
+               break;
+       case LOG_TYPE_DLOG: /* nothing to do */
+       default:
+               ltype = LOG_TYPE_DLOG;
+               break;
+       }
+       return 0;
+}
+
+void log_file_close(void)
+{
+       if (log_fp) {
+               fclose(log_fp);
+               log_fp = NULL;
+               dlog_print(DLOG_DEBUG, LOG_TAG, "close log file\n");
+       }
+
+       log_type_set(LOG_TYPE_DLOG);
+
+       return;
+}
+
+int log_print(log_priority prio, const char *tag, const char *fmt, ...)
+{
+       va_list ap;
+
+       switch (ltype) {
+       case LOG_TYPE_FILE:
+               if (log_fp) {
+                       va_start(ap, fmt);
+                       fprintf(log_fp, "[%s] [%s]", getFormattedTime(), log_prio_name[prio]);
+                       vfprintf(log_fp, fmt, ap);
+                       va_end(ap);
+                       fflush(log_fp);
+               }
+               break;
+       case LOG_TYPE_ALL:
+               va_start(ap, fmt);
+               if (log_fp) {
+                       fprintf(log_fp, "[%s] [%s]", getFormattedTime(), log_prio_name[prio]);
+                       vfprintf(log_fp, fmt, ap);
+               }
+               dlog_vprint(prio, tag, fmt, ap);
+               va_end(ap);
+
+               if (log_fp)
+                       fflush(log_fp);
+               break;
+       case LOG_TYPE_DLOG:
+       default:
+               va_start(ap, fmt);
+               dlog_vprint(prio, tag, fmt, ap);
+               va_end(ap);
+               break;
+       }
+       return 0;
+}