SET(INSTALL_EXEC_PREFIX "${INSTALL_PREFIX}/bin")
SET(INSTALL_RESDIR "${INSTALL_PREFIX}/res")
-SET(INSTALL_RESDIR "/home/owner/apps_rw/org.tizen.position-finder-server/res")
+SET(INSTALL_OWNER_RESDIR "/home/owner/apps_rw/org.tizen.position-finder-server/res")
+SET(INSTALL_OWNER_DATADIR "/home/owner/apps_rw/org.tizen.position-finder-server/data")
SET(CMAKE_VERBOSE_MAKEFILE 0)
SET(PROJECT_ROOT_DIR "${CMAKE_SOURCE_DIR}")
INSTALL(FILES ${PROJECT_ROOT_DIR}/tizen-manifest.xml DESTINATION ${SYS_PACKAGES_DIR} RENAME org.tizen.position-finder-server.xml)
INSTALL(DIRECTORY DESTINATION ${PREFIX}/data)
INSTALL(FILES ${PROJECT_ROOT_DIR}/shared/res/position_finder_server.png DESTINATION ${SYS_ICONS_DIR})
-INSTALL(FILES ${PROJECT_ROOT_DIR}/res/iotcon-test-svr-db-server.dat DESTINATION ${INSTALL_RESDIR})
+INSTALL(FILES ${PROJECT_ROOT_DIR}/res/iotcon-test-svr-db-server.dat DESTINATION ${INSTALL_OWNER_RESDIR})
# End of a file
%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_res_dir /home/owner/apps_rw/org.tizen.position-finder-server/res
%define _pkg_rw_data_dir /home/owner/apps_rw/org.tizen.position-finder-server/data
+%define _pkg_res_dir /home/owner/apps_rw/org.tizen.position-finder-server/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
%post
/sbin/ldconfig
-chsmack -a "User::Pkg::org.tizen.position-finder-server" %{_pkg_rw_res_dir}/*.dat
-chmod 666 %{_pkg_rw_res_dir}/*.dat
+chsmack -a "User::Pkg::org.tizen.position-finder-server" %{_pkg_res_dir}/*.dat
+chmod 666 %{_pkg_res_dir}/*.dat
-touch %{_pkg_rw_data_dir}/*.dat
+mkdir -p %{_pkg_rw_data_dir}
+touch %{_pkg_rw_data_dir}/iotcon-test-svr-db-server.dat
chsmack -a "User::Pkg::org.tizen.position-finder-server" %{_pkg_rw_data_dir}/*.dat
chmod 666 %{_pkg_rw_data_dir}/*.dat
%files
%manifest org.tizen.position-finder-server.manifest
-%{_pkg_rw_res_dir}/*.dat
+%{_pkg_res_dir}/*.dat
%defattr(-,root,root,-)
%{_pkg_dir}/bin/position-finder-server
%{_sys_packages_dir}/org.tizen.position-finder-server.xml
#include "log.h"
#include "connectivity.h"
-#define ULTRASONIC_RESOURCE_1_URI "/door/1"
-#define ULTRASONIC_RESOURCE_2_URI "/door/2"
#define ULTRASONIC_RESOURCE_TYPE "org.tizen.door"
+#define CBOR_FILE_IN_RES "/home/owner/apps_rw/org.tizen.position-finder-server/res/iotcon-test-svr-db-server.dat"
+#define CBOR_FILE_IN_DATA "/home/owner/apps_rw/org.tizen.position-finder-server/data/iotcon-test-svr-db-server.dat"
#define BUFSIZE 1024
-#define CBOR_FILE_IN_RES "/home/owner/apps_rw/org.tizen.position-finder-server/res/iotcon-test-svr-db-server.dat"
-#define CBOR_FILE_IN_DATA "/home/owner/apps_rw/org.tizen.position-finder-server/data/iotcon-test-svr-db-server.dat"
static void _request_resource_handler(iotcon_resource_h resource, iotcon_request_h request, void *user_data);
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;