summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 20:58:52 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 20:58:52 +0900
commit42ef5c138eaa577ce22e1cb125fb1b76e0b17dd1 (patch)
tree11dceb1d122dbbcb09d42b4c864c7112afd2664b
parent66c723dc7c2e23b14ebb1704cce1496dff930ef2 (diff)
downloadlibsvi-tizen_2.0.tar.gz
libsvi-tizen_2.0.tar.bz2
libsvi-tizen_2.0.zip
-rw-r--r--AUTHORS1
-rw-r--r--[-rwxr-xr-x]CMakeLists.txt60
-rw-r--r--[-rwxr-xr-x]LICENSE.APLv2 (renamed from LICENSE)0
-rw-r--r--NOTICE3
-rw-r--r--[-rwxr-xr-x]SLP_FEEDBACK_PG.h (renamed from SLP_SVI_PG.h)4
-rwxr-xr-xdebian/changelog7
-rwxr-xr-xdebian/compat1
-rwxr-xr-xdebian/control24
-rwxr-xr-xdebian/dirs2
-rwxr-xr-xdebian/docs1
-rwxr-xr-xdebian/libsvi-0.install.in1
-rwxr-xr-xdebian/libsvi-dev.install.in3
-rwxr-xr-xdebian/rules116
-rw-r--r--feedback.pc.in11
-rw-r--r--include/feedback-file.h214
-rw-r--r--include/feedback-ids.h132
-rw-r--r--include/feedback-internal.h46
-rw-r--r--include/feedback-log.h34
-rw-r--r--include/feedback.h160
-rwxr-xr-xinclude/svi-file.h177
-rwxr-xr-xinclude/svi-ids.h170
-rwxr-xr-xinclude/svi-log.h14
-rwxr-xr-xinclude/svi.h165
-rw-r--r--packaging/libfeedback.manifest9
-rw-r--r--packaging/libfeedback.spec94
-rw-r--r--packaging/libsvi.manifest6
-rw-r--r--packaging/libsvi.spec62
-rwxr-xr-xpg-doxy/doxygen.conf850
-rwxr-xr-xpg-doxy/pg-doxy.sh39
-rw-r--r--pg-doxy/slp_doxy.css699
-rwxr-xr-xpg-doxy/tool/bin/doxygenbin6075840 -> 0 bytes
-rwxr-xr-xpg-doxy/tool/bin/doxytagbin301465 -> 0 bytes
-rw-r--r--pg-doxy/tool/man/man1/doxygen.146
-rw-r--r--pg-doxy/tool/man/man1/doxytag.121
-rw-r--r--src/feedback-internal.c524
-rw-r--r--src/feedback.c168
-rw-r--r--src/svi.c330
-rwxr-xr-xsvi.c439
-rw-r--r--[-rwxr-xr-x]svi.pc.in4
-rwxr-xr-xtest/svi_test.c197
40 files changed, 2187 insertions, 2647 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..d14debe
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Jiyoung Yun <jy910.yun@samsung.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e6345a..ce62db9 100755..100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,48 +1,74 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(svi C)
+PROJECT(feedback C)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
SET(LIBDIR "\${prefix}/lib")
SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}")
SET(VERSION 0.1.4)
-SET(TESTSVI svi_test)
-SET(SRCS svi.c)
-SET(TEST_SRCS test/svi_test.c)
+SET(SRCS
+ src/feedback.c
+ src/feedback-internal.c)
+
+SET(HEADERS
+ SLP_FEEDBACK_PG.h
+ include/feedback.h
+ include/feedback-ids.h)
+
+SET(SVI_NAME svi)
+
+SET(SVI_HEADERS
+ include/svi.h
+ include/svi-ids.h)
+
+SET(SVI_SRCS
+ src/svi.c)
+
+SET(DEPENDENTS "vconf haptic mm-keysound dlog")
+SET(PC_DEPENDENTS "capi-base-common")
+
+SET(PC_NAME ${PROJECT_NAME})
+SET(PC_REQUIRED ${PC_DEPENDENTS})
+SET(PC_LDFLAGS -l${PROJECT_NAME})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED vconf devman_haptic mm-keysound dlog)
+pkg_check_modules(pkgs REQUIRED ${DEPENDENTS})
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
-ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
-ADD_DEFINITIONS("-DDATAFS=\"$ENV{DATADIR}\"")
-
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
-ADD_EXECUTABLE(${TESTSVI} ${TEST_SRCS})
-TARGET_LINK_LIBRARIES(${TESTSVI} ${exppkgs_LDFLAGS})
-TARGET_LINK_LIBRARIES(${TESTSVI} ${PROJECT_NAME})
+ADD_LIBRARY(${SVI_NAME} SHARED ${SVI_SRCS})
+SET_TARGET_PROPERTIES(${SVI_NAME} PROPERTIES SOVERSION 0)
+SET_TARGET_PROPERTIES(${SVI_NAME} PROPERTIES VERSION ${VERSION})
+TARGET_LINK_LIBRARIES(${SVI_NAME} -L${CMAKE_BINARY_DIR} -lfeedback)
+TARGET_LINK_LIBRARIES(${SVI_NAME} ${pkgs_LDFLAGS})
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
-#CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc @ONLY)
+CONFIGURE_FILE(${SVI_NAME}.pc.in ${SVI_NAME}.pc @ONLY)
+
+FOREACH(hfile ${HEADERS})
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${hfile} DESTINATION include/${PROJECT_NAME})
+ENDFOREACH(hfile)
+
+FOREACH(hfile ${SVI_HEADERS})
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${hfile} DESTINATION include/${SVI_NAME})
+ENDFOREACH(hfile)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS ${SVI_NAME} DESTINATION lib COMPONENT RuntimeLibraries)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/svi.h DESTINATION include/${PROJECT_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/svi-ids.h DESTINATION include/${PROJECT_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SLP_SVI_PG.h DESTINATION include/${PROJECT_NAME})
-INSTALL(TARGETS ${TESTSVI} DESTINATION bin)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SVI_NAME}.pc DESTINATION lib/pkgconfig)
diff --git a/LICENSE b/LICENSE.APLv2
index a06208b..a06208b 100755..100644
--- a/LICENSE
+++ b/LICENSE.APLv2
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..ccdad52
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,3 @@
+Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE file for Apache License terms and conditions.
diff --git a/SLP_SVI_PG.h b/SLP_FEEDBACK_PG.h
index 77b7f97..5ab2fbd 100755..100644
--- a/SLP_SVI_PG.h
+++ b/SLP_FEEDBACK_PG.h
@@ -159,8 +159,8 @@ if (r != SVI_SUCCESS){
SVI_VIB_OPERATION_POWER_ON
SVI_VIB_OPERATION_POWER_OFF
SVI_VIB_OPERATION_CHARGERCONN
- SVI_VIB_OPERATION_FULLYCHARGED
- SVI_VIB_OPERATION_LOTBATT
+ SVI_VIB_OPERATION_FULLCHARGED
+ SVI_VIB_OPERATION_LOWBATT
SVI_VIB_OPERATION_LOCK
SVI_VIB_OPERATION_UNLOCK
SVI_VIB_OPERATION_CALLCONNECT
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100755
index cbf3236..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,7 +0,0 @@
-libsvi (0.1.0-28) unstable; urgency=low
-
- * Initial Release.
- * Git: pkgs/l/libsvi
- * Tag: libsvi_0.1.0-28
-
- -- Sangil Yoon <si83.yoon@samsung.com> Wed, 07 Dec 2011 09:08:58 +0900
diff --git a/debian/compat b/debian/compat
deleted file mode 100755
index 7ed6ff8..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100755
index a42284e..0000000
--- a/debian/control
+++ /dev/null
@@ -1,24 +0,0 @@
-Source: libsvi
-Section: libs
-Priority: optional
-Maintainer: Jayoun Lee <airjany@samsung.com>, Seokkyu Jang <seokkyu.jang@samsung.com>, Sangil Yoon <si83.yoon@samsung.com>
-Build-Depends: debhelper (>= 5), libslp-setting-dev, libdevman-haptic-dev, libmm-sound-dev, dlog-dev
-Standards-Version: 3.7.2
-
-Package: libsvi-dev
-Section: libs
-Architecture: any
-Depends: libsvi-0 (= ${Source-Version}), libslp-setting-dev, libdevman-haptic-dev, libmm-sound-dev, dlog-dev
-Description: svi library (development)
-
-Package: libsvi-0
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: svi library (shared object)
-
-Package: libsvi-dbg
-Section: debug
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libsvi-0 (= ${Source-Version})
-Description: svi library (unstripped)
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100755
index ca882bb..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/sbin
diff --git a/debian/docs b/debian/docs
deleted file mode 100755
index a0f0008..0000000
--- a/debian/docs
+++ /dev/null
@@ -1 +0,0 @@
-CMakeLists.txt
diff --git a/debian/libsvi-0.install.in b/debian/libsvi-0.install.in
deleted file mode 100755
index a7c24c5..0000000
--- a/debian/libsvi-0.install.in
+++ /dev/null
@@ -1 +0,0 @@
-@PREFIX@/lib/*.so.*
diff --git a/debian/libsvi-dev.install.in b/debian/libsvi-dev.install.in
deleted file mode 100755
index 6975317..0000000
--- a/debian/libsvi-dev.install.in
+++ /dev/null
@@ -1,3 +0,0 @@
-@PREFIX@/include/*
-@PREFIX@/lib/pkgconfig/*.pc
-@PREFIX@/lib/*.so
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index c595535..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-CFLAGS ?= -Wall -g
-LDFLAGS ?=
-PREFIX ?= /usr
-DATADIR ?= /opt
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX)
-
- touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
- dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE)
- #docbook-to-man debian/wavplayer.sgml > wavplayer.1
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- cat $$f > $${f%.in}; \
- sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
- sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
- done
-
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) clean
- rm -rf CMakeCache.txt
- rm -rf CMakeFiles
- rm -rf cmake_install.cmake
- rm -rf Makefile
- rm -rf install_manifest.txt
-
- for f in `find $(CURDIR)/ -name "*.in"`; do \
- rm -f $${f%.in}; \
- done
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/wavplayer.
- $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install --sourcedir=debian/tmp
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_link
- dh_strip --dbg-package=libsvi-dbg
- dh_compress
- dh_fixperms
-# dh_perl
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/feedback.pc.in b/feedback.pc.in
new file mode 100644
index 0000000..392a254
--- /dev/null
+++ b/feedback.pc.in
@@ -0,0 +1,11 @@
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: @PC_NAME@
+Description: @PACKAGE_DESCRIPTION@
+Version: @VERSION@
+Requires: @PC_REQUIRED@
+Libs: -L${libdir} @PC_LDFLAGS@
+Cflags: -I${includedir}
diff --git a/include/feedback-file.h b/include/feedback-file.h
new file mode 100644
index 0000000..b86b28d
--- /dev/null
+++ b/include/feedback-file.h
@@ -0,0 +1,214 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 __FEEDBACK_FILE_H__
+#define __FEEDBACK_FILE_H__
+
+#define FEEDBACK_DATA_DIR "/opt/share/svi/"
+#define FEEDBACK_ORIGIN_DATA_DIR "/usr/share/svi/"
+
+#define FEEDBACK_SOUND_DIR FEEDBACK_DATA_DIR"sound/"
+#define FEEDBACK_SOUND_TOUCH_DIR FEEDBACK_SOUND_DIR"touch/"
+#define FEEDBACK_SOUND_OPER_DIR FEEDBACK_SOUND_DIR"operation/"
+
+#define FEEDBACK_HAPTIC_DIR FEEDBACK_DATA_DIR"haptic/"
+#define FEEDBACK_HAPTIC_TOUCH_DIR FEEDBACK_HAPTIC_DIR"touch/"
+#define FEEDBACK_HAPTIC_OPER_DIR FEEDBACK_HAPTIC_DIR"operation/"
+#define FEEDBACK_HAPTIC_NOTI_DIR FEEDBACK_HAPTIC_DIR"notification/"
+#define FEEDBACK_HAPTIC_DEFAULT_DIR FEEDBACK_HAPTIC_DIR"default/"
+
+const char* snd_file[] = {
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
+ FEEDBACK_SOUND_TOUCH_DIR"touch.wav",
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
+ FEEDBACK_SOUND_TOUCH_DIR"sip.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"sip_backspace.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"sip.wav",
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
+ FEEDBACK_SOUND_TOUCH_DIR"key0.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key1.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key2.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key3.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key4.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key5.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key6.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key7.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key8.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"key9.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"keyasterisk.wav",
+ FEEDBACK_SOUND_TOUCH_DIR"keysharp.wav",
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ NULL,
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ NULL,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ NULL,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ NULL,
+
+ /* NOTIFICATION : INCOMING : MESSAGE */
+ NULL,
+ /* NOTIFICATION : INCOMING : MESSAGE ALERT ON CALL */
+ NULL,
+ /* NOTIFICATION : INCOMING : EMAIL */
+ NULL,
+ /* NOTIFICATION : INCOMING : EMAIL ALERT ON CALL */
+ NULL,
+ /* NOTIFICATION : ALARM : WAKEUP */
+ NULL,
+ /* NOTIFICATION : ALARM : WAKEUP ALERT ON CALL */
+ NULL,
+ /* NOTIFICATION : ALARM : SCHEDULE */
+ NULL,
+ /* NOTIFICATION : ALARM : SCHEDULE ALERT ON CALL */
+ NULL,
+ /* NOTIFICATION : ALARM : TIMER */
+ NULL,
+ /* NOTIFICATION : ALARM : TIMER ALERT ON CALL */
+ NULL,
+ /* NOTIFICATION : GENERAL(TICKER/IM/SMS ETC) */
+ NULL,
+ /* NOTIFICATION : GENERAL(TICKER/IM/SMS ETC) ALERT ON CALL */
+ NULL,
+
+ /* OPERATION : POWER ON/OFF */
+ FEEDBACK_SOUND_OPER_DIR"power_on.wav",
+ NULL,
+ /* OPERATION : CHARGECONN */
+ FEEDBACK_SOUND_OPER_DIR"charger_connection.wav",
+ /* OPERATION : CHARGECONN ALERT ON CALL */
+ FEEDBACK_SOUND_OPER_DIR"charger_connection.wav",
+ /* OPERATION : FULLCHAREGED */
+ FEEDBACK_SOUND_OPER_DIR"fully_charged.wav",
+ /* OPERATION : FULLCHAREGED ALERT ON CALL */
+ FEEDBACK_SOUND_OPER_DIR"fully_charged.wav",
+ /* OPERATION : LOW BATTERY */
+ FEEDBACK_SOUND_OPER_DIR"low_battery.wav",
+ /* OPERATION : LOW BATTERY ALERT ON CALL */
+ FEEDBACK_SOUND_OPER_DIR"low_battery.wav",
+ /* OPERATION : LOCK/UNLOCK */
+ FEEDBACK_SOUND_OPER_DIR"lock.wav",
+ FEEDBACK_SOUND_OPER_DIR"unlock.wav",
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
+ FEEDBACK_SOUND_OPER_DIR"call_connect.wav",
+ FEEDBACK_SOUND_OPER_DIR"call_disconnect.wav",
+ /* OPERATION : MINUTE MINDER */
+ FEEDBACK_SOUND_OPER_DIR"minute_minder.wav",
+ /* OPERATION : VIBRATION */
+ NULL,
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
+ FEEDBACK_SOUND_OPER_DIR"shutter.wav",
+ /* OPERATION : LIST RE-ORDER */
+ FEEDBACK_SOUND_OPER_DIR"list_reorder.wav",
+ /* OPERATION : LIST SLIDER */
+ FEEDBACK_SOUND_OPER_DIR"slider_sweep.wav",
+ /* OPERATION : VOLUME KEY */
+ FEEDBACK_SOUND_OPER_DIR"volume_control.wav",
+
+};
+
+const char* haptic_file[] = {
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
+ NULL,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
+ NULL,
+ NULL,
+ NULL,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ FEEDBACK_HAPTIC_TOUCH_DIR"touch.tht",
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ FEEDBACK_HAPTIC_TOUCH_DIR"touch.tht",
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ NULL,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ NULL,
+
+ /* NOTIFICATION : INCOMING : MESSAGE */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : INCOMING : MESSAGE ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : INCOMING : EMAIL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : INCOMING : EMAIL ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : ALARM : WAKEUP */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : ALARM : WAKEUP ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : ALARM : SCHEDULE */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : ALARM : SCHEDULE ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : ALARM : TIMER */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : ALARM : TIMER ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : GENERAL(TICKER/IM/SMS ETC) */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* NOTIFICATION : GENERAL(TICKER/IM/SMS ETC) ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+
+ /* OPERATION : POWER ON/OFF */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : CHARGECONN */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : CHARGECONN ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : FULLCHAREGED */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : FULLCHAREGED ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : LOW BATTERY */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : LOW BATTERY ALERT ON CALL */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : LOCK/UNLOCK */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : MINUTE MINDER */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : VIBRATION */
+ FEEDBACK_HAPTIC_DEFAULT_DIR"Basic_call.tht",
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
+ NULL,
+ /* OPERATION : LIST RE-ORDER */
+ NULL,
+ /* OPERATION : LIST SLIDER */
+ NULL,
+ /* OPERATION : VOLUME KEY */
+ NULL,
+};
+
+#endif //__FEEDBACK_FILE_H__
diff --git a/include/feedback-ids.h b/include/feedback-ids.h
new file mode 100644
index 0000000..6cdbd8a
--- /dev/null
+++ b/include/feedback-ids.h
@@ -0,0 +1,132 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 __FEEDBACK_IDS_H__
+#define __FEEDBACK_IDS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file feedback-ids.h
+ * @brief This file contains the feedback API
+ */
+
+/**
+ * @addtogroup FEEDBACK
+ * @{
+ */
+
+/**
+ * @brief Enumerations of the type for feedback interface
+ * @details
+ *
+ */
+typedef enum
+{
+ FEEDBACK_TYPE_NONE,
+ FEEDBACK_TYPE_SOUND,
+ FEEDBACK_TYPE_VIBRATION,
+ FEEDBACK_TYPE_END
+} feedback_type_e;
+
+/**
+ * @brief Enumerations of the system pre-defined patterns for feedback interface
+ * @details
+ * Each feedback pattern can have separate media files of each types.
+ * But Depending on vendor design, pattern may not have any type of file.
+ *
+ */
+typedef enum
+{
+ FEEDBACK_PATTERN_NONE = -1,
+
+ FEEDBACK_PATTERN_TAP = 0, /**< feedback pattern when general touch */
+ FEEDBACK_PATTERN_SIP, /**< feedback pattern when touch text key */
+ FEEDBACK_PATTERN_SIP_BACKSPACE, /**< feedback pattern when touch backspace key */
+ FEEDBACK_PATTERN_MAX_CHARACTER, /**< feedback pattern when max character */
+ FEEDBACK_PATTERN_KEY0, /**< feedback pattern when touch numeric 0 key */
+ FEEDBACK_PATTERN_KEY1, /**< feedback pattern when touch numeric 1 key */
+ FEEDBACK_PATTERN_KEY2, /**< feedback pattern when touch numeric 2 key */
+ FEEDBACK_PATTERN_KEY3, /**< feedback pattern when touch numeric 3 key */
+ FEEDBACK_PATTERN_KEY4, /**< feedback pattern when touch numeric 4 key */
+ FEEDBACK_PATTERN_KEY5, /**< feedback pattern when touch numeric 5 key */
+ FEEDBACK_PATTERN_KEY6, /**< feedback pattern when touch numeric 6 key */
+ FEEDBACK_PATTERN_KEY7, /**< feedback pattern when touch numeric 7 key */
+ FEEDBACK_PATTERN_KEY8, /**< feedback pattern when touch numeric 8 key */
+ FEEDBACK_PATTERN_KEY9, /**< feedback pattern when touch numeric 9 key */
+ FEEDBACK_PATTERN_KEY_STAR, /**< feedback pattern when touch star key */
+ FEEDBACK_PATTERN_KEY_SHARP, /**< feedback pattern when touch sharp key */
+ FEEDBACK_PATTERN_HOLD, /**< feedback pattern when touch hold */
+ FEEDBACK_PATTERN_MULTI_TAP, /**< feedback pattern when multi touch */
+ FEEDBACK_PATTERN_HW_TAP, /**< feedback pattern when press hardware key */
+ FEEDBACK_PATTERN_HW_HOLD, /**< feedback pattern when holding press hardware key */
+
+ FEEDBACK_PATTERN_MESSAGE, /**< feedback pattern when incoming a message */
+ FEEDBACK_PATTERN_MESSAGE_ON_CALL, /**< feedback pattern when incoming a message on call */
+ FEEDBACK_PATTERN_EMAIL, /**< feedback pattern when incoming an email */
+ FEEDBACK_PATTERN_EMAIL_ON_CALL, /**< feedback pattern when incoming an email on call */
+ FEEDBACK_PATTERN_WAKEUP, /**< feedback pattern when alert wake up call */
+ FEEDBACK_PATTERN_WAKEUP_ON_CALL, /**< feedback pattern when alert wake up call on call */
+ FEEDBACK_PATTERN_SCHEDULE, /**< feedback pattern when alert schedule alarm */
+ FEEDBACK_PATTERN_SCHEDULE_ON_CALL, /**< feedback pattern when alert schedule alarm on call */
+ FEEDBACK_PATTERN_TIMER, /**< feedback pattern when alert timer */
+ FEEDBACK_PATTERN_TIMER_ON_CALL, /**< feedback pattern when alert timer on call */
+ FEEDBACK_PATTERN_GENERAL, /**< feedback pattern when alert general event */
+ FEEDBACK_PATTERN_GENERAL_ON_CALL, /**< feedback pattern when alert general event on call */
+
+ FEEDBACK_PATTERN_POWERON, /**< feedback pattern when power on */
+ FEEDBACK_PATTERN_POWEROFF, /**< feedback pattern when power off */
+ FEEDBACK_PATTERN_CHARGERCONN, /**< feedback pattern when connecting charger */
+ FEEDBACK_PATTERN_CHARGERCONN_ON_CALL, /**< feedback pattern when connecting charger on call */
+ FEEDBACK_PATTERN_FULLCHARGED, /**< feedback pattern when full charged */
+ FEEDBACK_PATTERN_FULLCHARGED_ON_CALL, /**< feedback pattern when full charged on call */
+ FEEDBACK_PATTERN_LOWBATT, /**< feedback pattern when low battery */
+ FEEDBACK_PATTERN_LOWBATT_ON_CALL, /**< feedback pattern when low battery on call */
+ FEEDBACK_PATTERN_LOCK, /**< feedback pattern when lock */
+ FEEDBACK_PATTERN_UNLOCK, /**< feedback pattern when unlock */
+ FEEDBACK_PATTERN_CALLCONNECT, /**< feedback pattern when connecting call */
+ FEEDBACK_PATTERN_DISCALLCONNECT, /**< feedback pattern when disconnecting call */
+ FEEDBACK_PATTERN_MINUTEMINDER, /**< feedback pattern when minute minder */
+ FEEDBACK_PATTERN_VIBRATION, /**< feedback pattern when vibration */
+ FEEDBACK_PATTERN_SHUTTER, /**< feedback pattern when screen capture or camera shutter */
+ FEEDBACK_PATTERN_LIST_REORDER, /**< feedback pattern when list reorder */
+ FEEDBACK_PATTERN_SLIDER_SWEEP, /**< feedback pattern when slider sweep */
+ FEEDBACK_PATTERN_VOLUME_KEY, /**< feedback pattern when pressed volume key */
+
+ FEEDBACK_PATTERN_END,
+
+ /* START : Will be removed */
+ FEEDBACK_PATTERN_TOUCH_TAP = FEEDBACK_PATTERN_TAP,
+ FEEDBACK_PATTERN_TOUCH_MULTI_TAP = FEEDBACK_PATTERN_MULTI_TAP,
+ FEEDBACK_PATTERN_TOUCH_KEY = FEEDBACK_PATTERN_KEY0,
+ FEEDBACK_PATTERN_TOUCH_HOLD = FEEDBACK_PATTERN_HOLD,
+ /* END : Will be removed */
+
+} feedback_pattern_e;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__FEEDBACK_IDS_H__
diff --git a/include/feedback-internal.h b/include/feedback-internal.h
new file mode 100644
index 0000000..4d8f519
--- /dev/null
+++ b/include/feedback-internal.h
@@ -0,0 +1,46 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 __FEEDBACK_LEGACY_H__
+#define __FEEDBACK_LEGACY_H__
+
+#include "feedback-ids.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file feedback-legacy.h
+ * @brief This file contains the feedback legacy API
+ */
+
+typedef void* feedback_h;
+
+int _feedback_init(feedback_h *handle);
+int _feedback_fini(feedback_h handle);
+int _feedback_play_sound(feedback_h handle, feedback_pattern_e key);
+int _feedback_play_vibration(feedback_h handle, feedback_pattern_e key);
+int _feedback_set_path(feedback_type_e type, feedback_pattern_e key, char* path);
+int _feedback_get_path(feedback_type_e type, feedback_pattern_e key, char* buf, unsigned int buflen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__SVI_H__
diff --git a/include/feedback-log.h b/include/feedback-log.h
new file mode 100644
index 0000000..f11dfbd
--- /dev/null
+++ b/include/feedback-log.h
@@ -0,0 +1,34 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 __FEEDBACK_LOG_H__
+#define __FEEDBACK_LOG_H__
+
+#define FEATURE_FEEDBACK_DLOG
+
+#ifdef FEATURE_FEEDBACK_DLOG
+ #define LOG_TAG "FEEDBACK"
+ #include <dlog.h>
+ #define FEEDBACK_LOG(fmt, args...) SLOGD(fmt, ##args)
+ #define FEEDBACK_ERROR(fmt, args...) SLOGE(fmt, ##args)
+#else
+ #define FEEDBACK_LOG(x, ...)
+ #define FEEDBACK_ERROR(x, ...)
+#endif
+
+#endif //__FEEDBACK_LOG_H__
diff --git a/include/feedback.h b/include/feedback.h
new file mode 100644
index 0000000..787cea6
--- /dev/null
+++ b/include/feedback.h
@@ -0,0 +1,160 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 __FEEDBACK_H__
+#define __FEEDBACK_H__
+
+#include <tizen_error.h>
+#include "feedback-ids.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file feedback.h
+ * @brief This file contains the feedback API
+ */
+
+/**
+ * @addtogroup FEEDBACK
+ * @{
+ * @breif
+ * This is a feedback API of the UIX Service.
+ * @}
+ */
+
+/**
+ * @addtogroup FEEDBACK
+ * @{
+ */
+
+/**
+ * @brief Enumerations of error codes for the Feedback API.
+ */
+typedef enum
+{
+ FEEDBACK_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+ FEEDBACK_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ FEEDBACK_ERROR_NOT_INITIALIZED = TIZEN_ERROR_SYSTEM_CLASS | 0x52, /**< Has not yet been Initialized */
+ FEEDBACK_ERROR_OPERATION_FAILED = TIZEN_ERROR_SYSTEM_CLASS | 0x55, /**< Operation failed */
+} feedback_error_e;
+
+#define FEEDBACK_SUCCEEDED(n) ((n) == FEEDBACK_ERROR_NONE)
+#define FEEDBACK_FAILED(n) ((n) != FEEDBACK_ERROR_NONE)
+
+/**
+ * @brief Initializes feedback API.
+ *
+ * @remarks
+ * If this function is not called in advance, other function will return #FEEDBACK_ERROR_NOT_INITIALIZED.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #FEEDBACK_ERROR_NONE Successful
+ * @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @see feedback_deinitialize()
+ */
+int feedback_initialize(void);
+
+/**
+ * @brief Deinitializes feedback API.
+ *
+ * @details This function must be called when feedback functions are no longer needed.
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #FEEDBACK_ERROR_NONE Successful
+ * @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation failed
+ *
+ * @see feedback_initialize()
+ */
+int feedback_deinitialize(void);
+
+/**
+ * @brief Plays various types of reactions that are pre-defined.
+ *
+ * @details
+ * This functon can be used to react to pre-defined actions. \n
+ * It play various types of system pre-defined media or vibration patterns.
+ *
+ * @remarks
+ * Currently, there are two types of reactions: sound and vibration. \n
+ * Depending on the settings, some types cannot operate.
+ * For example, when set to silent mode, the device doesn't produce any sound.
+ *
+ * @param[in] pattern The pre-defined pattern
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #FEEDBACK_ERROR_NONE Successful
+ * @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int feedback_play(feedback_pattern_e pattern);
+
+/**
+ *
+ * @brief Plays specific type of reactions that are pre-defined.
+ *
+ * @details
+ * This function can be used to react to pre-defined actions. \n
+ * It play specific type of system pre-defined pattern.
+ *
+ * @remarks
+ * Currently, there are two types of reactions: sound and vibration.
+ *
+ * @param[in] type The pattern type
+ * @param[in] pattern The pre-defined pattern
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #FEEDBACK_ERROR_NONE Successful
+ * @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int feedback_play_type(feedback_type_e type, feedback_pattern_e pattern);
+
+/**
+ * @brief Gets the file path of resource for the given feedback type and pattern.
+ *
+ * @details
+ * Depending on the type of each pattern resouorce has a different format. \n
+ * Currently, System supports two pattern types. \n
+ * #FEEDBACK_TYPE_SOUND type uses .wav format. \n
+ * #FEEDBACK_TYPE_VIBRATION type uses .ivt format. \n
+ * If the given pattern doesn't have a file for the type, @a path will return NULL.
+ *
+ * @remarks @a path must be released with free() by you.
+ *
+ * @param[in] type The pattern type
+ * @param[in] pattern The pre-defined pattern
+ * @param[out] path The file path of resource for feedback type and pattern
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #FEEDBACK_ERROR_NONE Successful
+ * @retval #FEEDBACK_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #FEEDBACK_ERROR_OPERATION_FAILED Operation failed
+ *
+ */
+int feedback_get_resource_path(feedback_type_e type, feedback_pattern_e pattern, char **path);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__FEEDBACK_H__
diff --git a/include/svi-file.h b/include/svi-file.h
new file mode 100755
index 0000000..119f769
--- /dev/null
+++ b/include/svi-file.h
@@ -0,0 +1,177 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 __SVI_FILE_H__
+#define __SVI_FILE_H__
+
+#define SVI_DATA_DIR "/opt/share/svi/"
+#define SVI_ORIGIN_DATA_DIR "/usr/share/svi/"
+
+#define SVI_SOUND_DIR SVI_DATA_DIR"sound/"
+#define SVI_SOUND_TOUCH_DIR SVI_SOUND_DIR"touch/"
+#define SVI_SOUND_OPER_DIR SVI_SOUND_DIR"operation/"
+
+#define SVI_HAPTIC_DIR SVI_DATA_DIR"haptic/"
+#define SVI_HAPTIC_TOUCH_DIR SVI_HAPTIC_DIR"touch/"
+#define SVI_HAPTIC_OPER_DIR SVI_HAPTIC_DIR"operation/"
+#define SVI_HAPTIC_NOTI_DIR SVI_HAPTIC_DIR"notification/"
+
+const char* snd_file[] = {
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
+ SVI_SOUND_TOUCH_DIR"touch1.wav",
+ SVI_SOUND_TOUCH_DIR"touch2.wav",
+ SVI_SOUND_TOUCH_DIR"touch3.wav",
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
+ SVI_SOUND_TOUCH_DIR"sip.wav",
+ SVI_SOUND_TOUCH_DIR"sip_backspace.wav",
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
+ SVI_SOUND_TOUCH_DIR"key0.wav",
+ SVI_SOUND_TOUCH_DIR"key1.wav",
+ SVI_SOUND_TOUCH_DIR"key2.wav",
+ SVI_SOUND_TOUCH_DIR"key3.wav",
+ SVI_SOUND_TOUCH_DIR"key4.wav",
+ SVI_SOUND_TOUCH_DIR"key5.wav",
+ SVI_SOUND_TOUCH_DIR"key6.wav",
+ SVI_SOUND_TOUCH_DIR"key7.wav",
+ SVI_SOUND_TOUCH_DIR"key8.wav",
+ SVI_SOUND_TOUCH_DIR"key9.wav",
+ SVI_SOUND_TOUCH_DIR"keyasterisk.wav",
+ SVI_SOUND_TOUCH_DIR"keysharp.wav",
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ SVI_SOUND_TOUCH_DIR"hold.wav",
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ SVI_SOUND_TOUCH_DIR"multi_tap.wav",
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ SVI_SOUND_TOUCH_DIR"hw_tap.wav",
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ SVI_SOUND_TOUCH_DIR"hw_hold.wav",
+
+ /* OPERATION : POWER ON/OFF */
+ SVI_SOUND_OPER_DIR"power_on.wav",
+ SVI_SOUND_OPER_DIR"power_off.wav",
+ /* OPERATION : CHARGECONN */
+ SVI_SOUND_OPER_DIR"charger_connection.wav",
+ /* OPERATION : FULLCHAREGED */
+ SVI_SOUND_OPER_DIR"fully_charged.wav",
+ /* OPERATION : LOW BATTERY */
+ SVI_SOUND_OPER_DIR"low_battery.wav",
+ /* OPERATION : LOCK/UNLOCK */
+ SVI_SOUND_OPER_DIR"lock.wav",
+ SVI_SOUND_OPER_DIR"unlock.wav",
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
+ SVI_SOUND_OPER_DIR"call_connect.wav",
+ SVI_SOUND_OPER_DIR"call_disconnect.wav",
+ /* OPERATION : MINUTE MINDER */
+ SVI_SOUND_OPER_DIR"minute_minder.wav",
+ /* OPERATION : VIBRATION */
+ SVI_SOUND_OPER_DIR"vibration.wav",
+ /* OPERATION : BALLOON MESSAGE SEND/RECV */
+ SVI_SOUND_OPER_DIR"new_chat.wav",
+ SVI_SOUND_OPER_DIR"sent_chat.wav",
+ /* OPERATION : ON/OFF SLIDER */
+ SVI_SOUND_OPER_DIR"on_off_slider.wav",
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
+ SVI_SOUND_OPER_DIR"shutter.wav",
+ /* OPERATION : LIST RE-ORDER */
+ SVI_SOUND_OPER_DIR"list_reorder.wav",
+ /* OPERATION : LIST SLIDER */
+ SVI_SOUND_OPER_DIR"slider_sweep.wav"
+};
+
+/* led_file and haptic_file should be managed in the same order */
+const char* haptic_file[] = {
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
+ SVI_HAPTIC_TOUCH_DIR"touch.ivt",
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
+ SVI_HAPTIC_TOUCH_DIR"sip.ivt",
+ SVI_HAPTIC_TOUCH_DIR"sip_backspace.ivt",
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
+ SVI_HAPTIC_TOUCH_DIR"key0.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key1.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key2.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key3.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key4.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key5.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key6.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key7.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key8.ivt",
+ SVI_HAPTIC_TOUCH_DIR"key9.ivt",
+ SVI_HAPTIC_TOUCH_DIR"keyasterisk.ivt",
+ SVI_HAPTIC_TOUCH_DIR"keysharp.ivt",
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ SVI_HAPTIC_TOUCH_DIR"hold.ivt",
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ SVI_HAPTIC_TOUCH_DIR"multi_tap.ivt",
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ SVI_HAPTIC_TOUCH_DIR"hw_tap.ivt",
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ SVI_HAPTIC_TOUCH_DIR"hw_hold.ivt",
+
+ /* NOTIFICATION : INCOMING : CALL */
+ SVI_HAPTIC_NOTI_DIR"incoming_call1.ivt",
+ SVI_HAPTIC_NOTI_DIR"incoming_call2.ivt",
+ SVI_HAPTIC_NOTI_DIR"incoming_call3.ivt",
+ SVI_HAPTIC_NOTI_DIR"incoming_call4.ivt",
+ SVI_HAPTIC_NOTI_DIR"incoming_call5.ivt",
+ SVI_HAPTIC_NOTI_DIR"incoming_call6.ivt",
+ /* NOTIFICATION : INCOMING : MESSAGE */
+ SVI_HAPTIC_NOTI_DIR"message.ivt",
+ /* NOTIFICATION : INCOMING : EMAIL */
+ SVI_HAPTIC_NOTI_DIR"email.ivt",
+ /* NOTIFICATION : ALARM : WAKEUP */
+ SVI_HAPTIC_NOTI_DIR"wakeup.ivt",
+ /* NOTIFICATION : ALARM : SCHEDULE */
+ SVI_HAPTIC_NOTI_DIR"schedule.ivt",
+ /* NOTIFICATION : ALARM : TIMER */
+ SVI_HAPTIC_NOTI_DIR"timer.ivt",
+ /* NOTIFICATION : GENERAL(TICKER/IM/SMS ETC) */
+ SVI_HAPTIC_NOTI_DIR"general.ivt",
+
+ /* OPERATION : POWER ON/OFF */
+ SVI_HAPTIC_OPER_DIR"power_on.ivt",
+ SVI_HAPTIC_OPER_DIR"power_off.ivt",
+ /* OPERATION : CHARGECONN */
+ SVI_HAPTIC_OPER_DIR"charger_connection.ivt",
+ /* OPERATION : FULLCHAREGED */
+ SVI_HAPTIC_OPER_DIR"fully_charged.ivt",
+ /* OPERATION : LOW BATTERY */
+ SVI_HAPTIC_OPER_DIR"low_battery.ivt",
+ /* OPERATION : LOCK/UNLOCK */
+ SVI_HAPTIC_OPER_DIR"lock.ivt",
+ SVI_HAPTIC_OPER_DIR"unlock.ivt",
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
+ SVI_HAPTIC_OPER_DIR"call_connect.ivt",
+ SVI_HAPTIC_OPER_DIR"call_disconnect.ivt",
+ /* OPERATION : MINUTE MINDER */
+ SVI_HAPTIC_OPER_DIR"minute_minder.ivt",
+ /* OPERATION : VIBRATION */
+ SVI_HAPTIC_OPER_DIR"vibration.ivt",
+ /* OPERATION : BALLOON MESSAGE SEND/RECV */
+ SVI_HAPTIC_OPER_DIR"new_chat.ivt",
+ SVI_HAPTIC_OPER_DIR"sent_chat.ivt",
+ /* OPERATION : ON/OFF SLIDER */
+ SVI_HAPTIC_OPER_DIR"on_off_slider.ivt",
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
+ SVI_HAPTIC_OPER_DIR"shutter.ivt",
+ /* OPERATION : LIST RE-ORDER */
+ SVI_HAPTIC_OPER_DIR"list_reorder.ivt",
+ /* OPERATION : LIST SLIDER */
+ SVI_HAPTIC_OPER_DIR"slider_sweep.ivt"
+};
+
+#endif //__SVI_FILE_H__
diff --git a/include/svi-ids.h b/include/svi-ids.h
index 0a004d2..330bc86 100755
--- a/include/svi-ids.h
+++ b/include/svi-ids.h
@@ -1,84 +1,105 @@
/*
- * libsvi
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
*
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seokkyu Jang <seokkyu.jang@samsung.com>
- * Contact: Sangil Yoon <si83.yoon@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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 __SVI_IDS_H__
#define __SVI_IDS_H__
+typedef enum svi_type_t {
+ SVI_TYPE_NONE,
+ SVI_TYPE_SND,
+ SVI_TYPE_VIB,
+ SVI_TYPE_END
+} svi_type;
typedef enum sound_type_t {
- SVI_SND_NONE = -1,
+ SVI_SND_NONE = -1,
- SVI_SND_TOUCH_TOUCH1 = 0,
- SVI_SND_TOUCH_TOUCH2,
- SVI_SND_TOUCH_TOUCH3,
- SVI_SND_TOUCH_SIP,
- SVI_SND_TOUCH_HOLD,
- SVI_SND_TOUCH_MULTI_TAP,
- SVI_SND_TOUCH_HW_TAP,
- SVI_SND_TOUCH_HW_HOLD,
-
- SVI_SND_TOUCH_KEY00,
- SVI_SND_TOUCH_KEY01,
- SVI_SND_TOUCH_KEY02,
- SVI_SND_TOUCH_KEY03,
- SVI_SND_TOUCH_KEY04,
- SVI_SND_TOUCH_KEY05,
- SVI_SND_TOUCH_KEY06,
- SVI_SND_TOUCH_KEY07,
- SVI_SND_TOUCH_KEY08,
- SVI_SND_TOUCH_KEY09,
- SVI_SND_TOUCH_KEY_STAR,
- SVI_SND_TOUCH_KEY_SHARP,
-
- SVI_SND_OPERATION_POWERON,
- SVI_SND_OPERATION_POWEROFF,
- SVI_SND_OPERATION_CHARGERCONN,
- SVI_SND_OPERATION_FULLCHARGED,
- SVI_SND_OPERATION_LOWBATT,
- SVI_SND_OPERATION_LOCK,
- SVI_SND_OPERATION_UNLOCK,
- SVI_SND_OPERATION_CALLCONN,
- SVI_SND_OPERATION_CALLDISCONN,
- SVI_SND_OPERATION_MINUTE_MINDER,
- SVI_SND_OPERATION_VIBRATION,
- SVI_SND_OPERATION_NEWCHAT,
- SVI_SND_OPERATION_SENTCHAT,
- SVI_SND_OPERATION_ONOFFSLIDER,
- SVI_SND_OPERATION_SCRCAPTURE,
-
- SVI_SND_ENUM_END = 100
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
+ SVI_SND_TOUCH_TOUCH1 = 0,
+ SVI_SND_TOUCH_TOUCH2,
+ SVI_SND_TOUCH_TOUCH3,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
+ SVI_SND_TOUCH_SIP,
+ SVI_SND_TOUCH_SIP_BACKSPACE,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
+ SVI_SND_TOUCH_KEY00,
+ SVI_SND_TOUCH_KEY01,
+ SVI_SND_TOUCH_KEY02,
+ SVI_SND_TOUCH_KEY03,
+ SVI_SND_TOUCH_KEY04,
+ SVI_SND_TOUCH_KEY05,
+ SVI_SND_TOUCH_KEY06,
+ SVI_SND_TOUCH_KEY07,
+ SVI_SND_TOUCH_KEY08,
+ SVI_SND_TOUCH_KEY09,
+ SVI_SND_TOUCH_KEY_STAR,
+ SVI_SND_TOUCH_KEY_SHARP,
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ SVI_SND_TOUCH_HOLD,
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ SVI_SND_TOUCH_MULTI_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ SVI_SND_TOUCH_HW_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ SVI_SND_TOUCH_HW_HOLD,
+ /* OPERATION : POWER ON/OFF */
+ SVI_SND_OPERATION_POWERON,
+ SVI_SND_OPERATION_POWEROFF,
+ /* OPERATION : CHARGECONN */
+ SVI_SND_OPERATION_CHARGERCONN,
+ /* OPERATION : FULLCHAREGED */
+ SVI_SND_OPERATION_FULLCHARGED,
+ /* OPERATION : LOW BATTERY */
+ SVI_SND_OPERATION_LOWBATT,
+ /* OPERATION : LOCK/UNLOCK */
+ SVI_SND_OPERATION_LOCK,
+ SVI_SND_OPERATION_UNLOCK,
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
+ SVI_SND_OPERATION_CALLCONN,
+ SVI_SND_OPERATION_CALLDISCONN,
+ /* OPERATION : MINUTE MINDER */
+ SVI_SND_OPERATION_MINUTE_MINDER,
+ /* OPERATION : VIBRATION */
+ SVI_SND_OPERATION_VIBRATION,
+ /* OPERATION : BALLOON MESSAGE SEND/RECV */
+ SVI_SND_OPERATION_NEWCHAT,
+ SVI_SND_OPERATION_SENTCHAT,
+ /* OPERATION : ON/OFF SLIDER */
+ SVI_SND_OPERATION_ONOFFSLIDER,
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
+ SVI_SND_OPERATION_SCRCAPTURE,
+ /* OPERATION : LIST RE-ORDER */
+ SVI_SND_OPERATION_LIST_REORDER,
+ /* OPERATION : LIST SLIDER */
+ SVI_SND_OPERATION_SLIDER_SWEEP,
+ SVI_SND_ENUM_END
} sound_type;
typedef enum vibration_type_t {
SVI_VIB_NONE = -1,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
SVI_VIB_TOUCH_TOUCH = 0,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
SVI_VIB_TOUCH_SIP,
- SVI_VIB_TOUCH_HOLD,
- SVI_VIB_TOUCH_MULTI_TAP,
- SVI_VIB_TOUCH_HW_TAP,
- SVI_VIB_TOUCH_HW_HOLD,
-
+ SVI_VIB_TOUCH_SIP_BACKSPACE,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
SVI_VIB_TOUCH_KEY00,
SVI_VIB_TOUCH_KEY01,
SVI_VIB_TOUCH_KEY02,
@@ -91,34 +112,67 @@ typedef enum vibration_type_t {
SVI_VIB_TOUCH_KEY09,
SVI_VIB_TOUCH_KEY_STAR,
SVI_VIB_TOUCH_KEY_SHARP,
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ SVI_VIB_TOUCH_HOLD,
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ SVI_VIB_TOUCH_MULTI_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ SVI_VIB_TOUCH_HW_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ SVI_VIB_TOUCH_HW_HOLD,
+ /* NOTIFICATION : INCOMING : CALL */
SVI_VIB_NOTIFICATION_INCOMING_CALL01,
SVI_VIB_NOTIFICATION_INCOMING_CALL02,
SVI_VIB_NOTIFICATION_INCOMING_CALL03,
+ SVI_VIB_NOTIFICATION_INCOMING_CALL04,
+ SVI_VIB_NOTIFICATION_INCOMING_CALL05,
+ SVI_VIB_NOTIFICATION_INCOMING_CALL06,
+ /* NOTIFICATION : INCOMING : MESSAGE */
SVI_VIB_NOTIFICATION_MESSAGE,
+ /* NOTIFICATION : INCOMING : EMAIL */
SVI_VIB_NOTIFICATION_EMAIL,
+ /* NOTIFICATION : ALARM : WAKEUP */
SVI_VIB_NOTIFICATION_WAKEUP,
+ /* NOTIFICATION : ALARM : SCHEDULE */
SVI_VIB_NOTIFICATION_SCHEDULE,
+ /* NOTIFICATION : ALARM : TIMER */
SVI_VIB_NOTIFICATION_TIMER,
+ /* NOTIFICATION : GENERAL(TICKER/IM/SMS ETC) */
SVI_VIB_NOTIFICATION_GENERAL,
-
+
+ /* OPERATION : POWER ON/OFF */
SVI_VIB_OPERATION_POWER_ON,
SVI_VIB_OPERATION_POWER_OFF,
+ /* OPERATION : CHARGECONN */
SVI_VIB_OPERATION_CHARGERCONN,
- SVI_VIB_OPERATION_FULLYCHARGED,
- SVI_VIB_OPERATION_LOTBATT,
+ /* OPERATION : FULLCHAREGED */
+ SVI_VIB_OPERATION_FULLCHARGED,
+ /* OPERATION : LOW BATTERY */
+ SVI_VIB_OPERATION_LOWBATT,
+ /* OPERATION : LOCK/UNLOCK */
SVI_VIB_OPERATION_LOCK,
SVI_VIB_OPERATION_UNLOCK,
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
SVI_VIB_OPERATION_CALLCONNECT,
SVI_VIB_OPERATION_DISCALLCONNECT,
+ /* OPERATION : MINUTE MINDER */
SVI_VIB_OPERATION_MINUTEMINDER,
+ /* OPERATION : VIBRATION */
SVI_VIB_OPERATION_VIBRATION,
+ /* OPERATION : BALLOON MESSAGE SEND/RECV */
SVI_VIB_OPERATION_NEWCHAT,
SVI_VIB_OPERATION_SENDCHAT,
+ /* OPERATION : ON/OFF SLIDER */
SVI_VIB_OPERATION_ONOFFSLIDER,
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
SVI_VIB_OPERATION_SHUTTER,
+ /* OPERATION : LIST RE-ORDER */
+ SVI_VIB_OPERATION_LIST_REORDER,
+ /* OPERATION : LIST SLIDER */
+ SVI_VIB_OPERATION_SLIDER_SWEEP,
- SVI_VIB_ENUM_END = 100
+ SVI_VIB_ENUM_END
} vibration_type;
diff --git a/include/svi-log.h b/include/svi-log.h
index a5c4bb0..eef6941 100755
--- a/include/svi-log.h
+++ b/include/svi-log.h
@@ -1,25 +1,21 @@
/*
- * libsvi
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
*
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seokkyu Jang <seokkyu.jang@samsung.com>
- * Contact: Sangil Yoon <si83.yoon@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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 __SVI_LOG_H__
#define __SVI_LOG_H__
diff --git a/include/svi.h b/include/svi.h
index 34c97c8..bbef08a 100755
--- a/include/svi.h
+++ b/include/svi.h
@@ -1,25 +1,21 @@
/*
- * libsvi
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
*
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seokkyu Jang <seokkyu.jang@samsung.com>
- * Contact: Sangil Yoon <si83.yoon@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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 __SVI_H__
#define __SVI_H__
@@ -27,7 +23,7 @@
* @addtogroup APPLICATION_FRAMEWORK
* @{
*
- * @defgroup SVI SVI
+ * @defgroup SVI SVI
* @brief A library for playing sound and vibration.
*
* @section Header To use Them:
@@ -39,6 +35,7 @@
* @code
SVI_VIB_TOUCH_TOUCH
SVI_VIB_TOUCH_SIP
+ SVI_VIB_TOUCH_SIP_BACKSPACE
SVI_VIB_TOUCH_HOLD
SVI_VIB_TOUCH_MULTI_TAP
SVI_VIB_TOUCH_HW_TAP
@@ -66,12 +63,12 @@
SVI_VIB_NOTIFICATION_SCHEDULE
SVI_VIB_NOTIFICATION_TIMER
SVI_VIB_NOTIFICATION_GENERAL
-
+
SVI_VIB_OPERATION_POWER_ON
SVI_VIB_OPERATION_POWER_OFF
SVI_VIB_OPERATION_CHARGERCONN
- SVI_VIB_OPERATION_FULLYCHARGED
- SVI_VIB_OPERATION_LOTBATT
+ SVI_VIB_OPERATION_FULLCHARGED
+ SVI_VIB_OPERATION_LOWBATT
SVI_VIB_OPERATION_LOCK
SVI_VIB_OPERATION_UNLOCK
SVI_VIB_OPERATION_CALLCONNECT
@@ -82,6 +79,8 @@
SVI_VIB_OPERATION_SENDCHAT
SVI_VIB_OPERATION_ONOFFSLIDER
SVI_VIB_OPERATION_SHUTTER
+ SVI_VIB_OPERATION_LIST_REORDER
+ SVI_VIB_OPERATION_SLIDER_SWEEP
* @endcode
*
* @section Snd_IDs Sound IDs
@@ -90,6 +89,7 @@
SVI_SND_TOUCH_TOUCH2
SVI_SND_TOUCH_TOUCH3
SVI_SND_TOUCH_SIP
+ SVI_SND_TOUCH_SIP_BACKSPACE
SVI_SND_TOUCH_HOLD
SVI_SND_TOUCH_MULTI_TAP
SVI_SND_TOUCH_HW_TAP
@@ -123,6 +123,8 @@
SVI_SND_OPERATION_SENTCHAT
SVI_SND_OPERATION_ONOFFSLIDER
SVI_SND_OPERATION_SCRCAPTURE
+ SVI_SND_OPERATION_LIST_REORDER
+ SVI_SND_OPERATION_SLIDER_SWEEP
* @endcode
*/
@@ -141,9 +143,6 @@ extern "C"
#define SVI_SUCCESS 0
#define SVI_ERROR -1
-#define SVI_TYPE_SND 0
-#define SVI_TYPE_VIB 1
-
/**
* \par Description:
* Initialize audio ui library.\n
@@ -171,7 +170,7 @@ extern "C"
* External Apps.
*
* \par Related functions:
- * svi_fini()
+ * svi_fini()
*
* \par Known issues/bugs:
* None
@@ -197,23 +196,23 @@ extern "C"
* int handle = 0;
*
* r = svi_init(&handle); //Initialize SVI
- *
+ *
* if ( r != SVI_SUCCESS ) {
- * printf("Cannot initialize SVI.\n");
+ * printf("Cannot initialize SVI.\n");
* svi_fini(handle); //If initialization is failed, finalize SVI directly
* } else {
*
- * r = svi_play (handle, SVI_VIB_TOUCH_TOUCH, SVI_SND_TOUCH_TOUCH1); //Play sound and vibration
+ * r = svi_play (handle, SVI_VIB_TOUCH_TOUCH, SVI_SND_TOUCH_TOUCH1); //Play sound and vibration
* if (r != SVI_SUCCESS) {
* printf("Cannot play sound or vibration.\n");
* }
*
* r = svi_fini(handle); //Finalize SVI
* if (r != SVI_SUCCESS) {
- * printf("Cannot close SVI.\n");
+ * printf("Cannot close SVI.\n");
* }
* }
- *
+ *
* ...
* \endcode
*/
@@ -247,7 +246,7 @@ int svi_init(int *handle);
* External Apps.
*
* \par Related functions:
- * svi_init()
+ * svi_init()
*
* \par Known issues/bugs:
* None
@@ -273,9 +272,9 @@ int svi_init(int *handle);
* int handle = 0;
*
* r = svi_init(&handle); //Initialize SVI
- *
+ *
* if ( r != SVI_SUCCESS ) {
- * printf("Cannot initialize SVI.\n");
+ * printf("Cannot initialize SVI.\n");
* svi_fini(handle); //If initialization is failed, finalize SVI directly
* } else {
*
@@ -286,10 +285,10 @@ int svi_init(int *handle);
*
* r = svi_fini(handle); //Finalize SVI
* if (r != SVI_SUCCESS) {
- * printf("Cannot close SVI.\n");
+ * printf("Cannot close SVI.\n");
* }
* }
- *
+ *
* ...
* \endcode
*/
@@ -348,25 +347,25 @@ int svi_fini(int handle);
* ...
* int r = 0;
* int handle = 0;
- *
+ *
* r = svi_init(&handle); //Initialize SVI
- *
+ *
* if ( r != SVI_SUCCESS ) {
- * printf("Cannot initialize SVI.\n");
+ * printf("Cannot initialize SVI.\n");
* svi_fini(handle); //If initialization is failed, finalize SVI directly
* } else {
*
- * r = svi_play_sound (handle, SVI_SND_TOUCH_TOUCH1); //Play sound
+ * r = svi_play_sound (handle, SVI_SND_TOUCH_TOUCH1); //Play sound
* if (r != SVI_SUCCESS) {
* printf("Cannot play sound or vibration.\n");
* }
*
* r = svi_fini(handle); //Finalize SVI
* if (r != SVI_SUCCESS) {
- * printf("Cannot close SVI.\n");
+ * printf("Cannot close SVI.\n");
* }
* }
- *
+ *
* ...
* \endcode
*/
@@ -424,11 +423,11 @@ int svi_play_sound(int handle, sound_type sound_key);
* ...
* int r = 0;
* int handle = 0;
- *
+ *
* r = svi_init(&handle); //Initialize SVI
- *
+ *
* if ( r != SVI_SUCCESS ) {
- * printf("Cannot initialize SVI.\n");
+ * printf("Cannot initialize SVI.\n");
* svi_fini(handle); //If initialization is failed, finalize SVI directly
* } else {
*
@@ -439,10 +438,10 @@ int svi_play_sound(int handle, sound_type sound_key);
*
* r = svi_fini(handle); //Finalize SVI
* if (r != SVI_SUCCESS) {
- * printf("Cannot close SVI.\n");
+ * printf("Cannot close SVI.\n");
* }
* }
- *
+ *
* ...
* \endcode
*/
@@ -501,11 +500,11 @@ int svi_play_vib(int handle, vibration_type vibration_key);
* ...
* int r = 0;
* int handle = 0;
- *
+ *
* r = svi_init(&handle); //Initialize SVI
- *
+ *
* if ( r != SVI_SUCCESS ) {
- * printf("Cannot initialize SVI.\n");
+ * printf("Cannot initialize SVI.\n");
* svi_fini(handle); //If initialization is failed, finalize SVI directly.
* } else {
*
@@ -516,10 +515,10 @@ int svi_play_vib(int handle, vibration_type vibration_key);
*
* r = svi_fini(handle); //Finalize SVI
* if (r != SVI_SUCCESS) {
- * printf("Cannot close SVI.\n");
+ * printf("Cannot close SVI.\n");
* }
* }
- *
+ *
* ...
* \endcode
*/
@@ -528,13 +527,77 @@ int svi_play(int handle, vibration_type vibration_key, sound_type sound_key);
/**
* \par Description:
- * Get filepath from predefined sound & vibration.\n
+ * Set filepath for sound & vibration pattern.\n
*
* \par Purpose:
- * This API is used for getting filepath of predefined sound or vibration.
+ * This API is used for setting filepath of sound & vibration pattern.
*
* \par Typical use case:
- * If user want to get filepath of sound or vibration for predefined simple pattern, he(or she) can use this API.
+ * In case that user want to set filepath of sound or vibration pattern.
+ *
+ * \par Method of function operation:
+ * SVI uses multimedia sound library and device manager library.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param svi_type [in] svi_type(sound, vibration).
+ * \param svi_enum [in] predefined enum_type.
+ * \param path [in] file path.
+ *
+ * \return Return Type (int) \n
+ * - SVI_SUCCESS - \n
+ * - SVI_ERROR - \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \par Related functions:
+ * None
+ *
+ * \par Known issues/bugs:
+ * None
+ *
+ * \pre
+ * None
+ *
+ * \post
+ * None
+ *
+ * \see
+ * None
+ *
+ * \remarks
+ * None
+ *
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <svi.h>
+ * ...
+ * int r = 0;
+ * char *path[512] = "/mnt/ums/sound/sound.wav";
+ *
+ * r = svi_set_path(SVI_SND_TYPE, SVI_SND_TOUCH_TOUCH1, path);
+ *
+ * if ( r != SVI_SUCCESS ) {
+ * printf("Fail.\n");
+ * }
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int svi_set_path(int svi_type, int svi_enum, char* path);
+
+/**
+ * \par Description:
+ * Get filepath for sound & vibration pattern.\n
+ *
+ * \par Purpose:
+ * This API is used for getting filepath of sound & vibration pattern.
+ *
+ * \par Typical use case:
+ * In case that user want to get filepath of sound or vibration pattern.
*
* \par Method of function operation:
* SVI uses multimedia sound library and device manager library.
@@ -578,13 +641,13 @@ int svi_play(int handle, vibration_type vibration_key, sound_type sound_key);
* #include <svi.h>
* ...
* int r = 0;
- * char buf[256] = {0,};
- *
+ * char buf[512] = {0,};
+ *
* r = svi_get_path(SVI_SND_TYPE, SVI_SND_TOUCH_TOUCH1, buf, sizeof(buf));
- *
+ *
* if ( r != SVI_SUCCESS ) {
- * printf("Fail.\n");
- * }
+ * printf("Fail.\n");
+ * }
* ...
* \endcode
*/
diff --git a/packaging/libfeedback.manifest b/packaging/libfeedback.manifest
new file mode 100644
index 0000000..f13bba5
--- /dev/null
+++ b/packaging/libfeedback.manifest
@@ -0,0 +1,9 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+ <assign>
+ <filesystem path="/usr/bin/svi_test" exec_label="_"/>
+ </assign>
+</manifest>
+
diff --git a/packaging/libfeedback.spec b/packaging/libfeedback.spec
new file mode 100644
index 0000000..cd1fa55
--- /dev/null
+++ b/packaging/libfeedback.spec
@@ -0,0 +1,94 @@
+Name: libfeedback
+Summary: Feedback library
+Version: 0.1.2
+Release: 21
+Group: System/Libraries
+License: Apache License, Version 2.0
+Source0: %{name}-%{version}.tar.gz
+Source1: libsvi.manifest
+source2: libfeedback.manifest
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: cmake
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(mm-keysound)
+BuildRequires: pkgconfig(haptic)
+BuildRequires: pkgconfig(capi-base-common)
+
+%description
+Feedback library for playing sound, vibration and led
+
+
+%package -n libfeedback-devel
+Summary: Feedback library for (devel)
+Group: Development/Libraries
+Requires: libfeedback = %{version}-%{release}
+
+%description -n libfeedback-devel
+Feedback library for playing sound, vibration and led (devel)
+
+%package -n libsvi
+Summary: SVI library
+Group: Development/Libraries
+Requires: libfeedback = %{version}-%{release}
+
+%description -n libsvi
+SVI library
+
+%package -n libsvi-devel
+Summary: SVI library for (devel)
+Group: Development/Libraries
+Requires: libsvi = %{version}-%{release}
+
+%description -n libsvi-devel
+SVI library (devel)
+
+
+%prep
+%setup -q
+
+%build
+cp %{SOURCE1} .
+cp %{SOURCE2} .
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+make
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest libfeedback.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libfeedback.so.*
+
+%files -n libfeedback-devel
+%defattr(-,root,root,-)
+%{_includedir}/feedback/*.h
+%{_libdir}/libfeedback.so
+%{_libdir}/pkgconfig/feedback.pc
+
+%files -n libsvi
+%manifest libsvi.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libsvi.so.*
+
+%files -n libsvi-devel
+%defattr(-,root,root-)
+%{_includedir}/svi/*.h
+%{_libdir}/libsvi.so
+%{_libdir}/pkgconfig/svi.pc
+
+%changelog
+* Mon Dec 10 2012 - Jae-young Hwang <j-zero.hwang@samsung.com>
+- Revise _feedback_play_vibration function for playing tht files.
+- Tag : libfeedback_0.1.2-17
+
+* Wed Nov 21 2012 - Jiyoung Yun <jy910.yun@samsung.com>
+- add FEEDBACK_PATTERN_MAX_CHARACTER enum
+- Tag : libfeedback_0.1.2-16
diff --git a/packaging/libsvi.manifest b/packaging/libsvi.manifest
new file mode 100644
index 0000000..81ace0c
--- /dev/null
+++ b/packaging/libsvi.manifest
@@ -0,0 +1,6 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
+
diff --git a/packaging/libsvi.spec b/packaging/libsvi.spec
deleted file mode 100644
index a67eb46..0000000
--- a/packaging/libsvi.spec
+++ /dev/null
@@ -1,62 +0,0 @@
-
-Name: libsvi
-Summary: SVI
-Version: 0.1.0
-Release: 1.1
-Group: System/Libraries
-License: Apache License v2.0
-Source0: libsvi-%{version}.tar.bz2
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-BuildRequires: cmake
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(devman_haptic)
-BuildRequires: pkgconfig(mm-keysound)
-BuildRequires: pkgconfig(devman)
-
-
-%description
-SVI
-
-
-%package devel
-Summary: SVI
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-SVI
-
-%prep
-%setup -q
-
-
-%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
-
-
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-
-%files
-%defattr(-,root,root,-)
-%{_bindir}/svi_test
-%{_libdir}/libsvi.so.*
-
-
-%files devel
-%defattr(-,root,root,-)
-%{_includedir}/svi/*.h
-%{_libdir}/libsvi.so
-%{_libdir}/pkgconfig/svi.pc
-
diff --git a/pg-doxy/doxygen.conf b/pg-doxy/doxygen.conf
deleted file mode 100755
index a7cd424..0000000
--- a/pg-doxy/doxygen.conf
+++ /dev/null
@@ -1,850 +0,0 @@
-# Doxyfile 1.5.2
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = SLP-Developer Library
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = ./doxygen_output
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF = NO
-ALWAYS_DETAILED_SEC = YES
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = YES
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = YES
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-BUILTIN_STL_SUPPORT = NO
-CPP_CLI_SUPPORT = NO
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = YES
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = YES
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = YES
-SORT_BY_SCOPE_NAME = YES
-SORT_GROUP_NAMES = YES
-GENERATE_TODOLIST = NO
-USE_INLINE_TREES = NO
-SHOW_NAMESPACES = NO
-HTML DYNAMIC SECTIONS = YES
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= NO
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = ..
-
-# This tag can be used to specify the character encoding of the source files that
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-FILE_PATTERNS = *.h \
- *.doxy
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS = */test/* \
- */debian/* \
- */lost+found/* \
- */i386/* \
- */arm/* \
- */simulator/* \
- *test* \
- */voda3rd/*
-EXCLUDE_SYMBOLS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH = ../image
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES (the default)
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code. Otherwise they will link to the documentstion.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 10
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =./slp_doxy.css
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = YES
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = YES
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 190
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = NO
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = NO
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = YES
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader. This is useful
-# if you want to understand what is going on. On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = NO
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
-# be found in the default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = NO
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = NO
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = NO
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = NO
-
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a caller dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = NO
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = NO
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = jpg
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen will always
-# show the root nodes and its direct children regardless of this setting.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = NO
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = NO
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE = YES
diff --git a/pg-doxy/pg-doxy.sh b/pg-doxy/pg-doxy.sh
deleted file mode 100755
index f542386..0000000
--- a/pg-doxy/pg-doxy.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-# Create doxygen from debian package server
-# By Jungbae Lee (yi_jungbae@samsung.com)
-
-cd `dirname $0`
-CWD=`pwd`
-
-# Use doxygen 1.7.0
-export PATH=/usr/local/bin:${HOME}/mytools/bin:${PATH}
-export LD_LIBRARY_PATH=${HOME}/mytools/lib:${LD_LIBRARY_PATH}
-
-
-### Configuration
-SBOX=/scratchbox/users/$USER/home/$USER
-DOXYGEN_OUTPUT_DIR=$CWD/doxygen_output
-DOXYGEN=./tool/bin/doxygen
-DOXY_CONF=doxygen.conf
-IMAGE_DIR=../image #need to change
-#IMAGE_DIR=[fill your image path]
-
-
-
-####doxygen configuration :: output Directory
-mkdir $DOXYGEN_OUTPUT_DIR
-
-echo "Doxygen running..."
-if [ ! -e $CWD/doxygen_output ]; then
- mkdir $CWD/doxygen_output
-fi
-# Run doxygen
-$DOXYGEN $DOXY_CONF 2>&1
-
-#image copy
-cp $CWD/$IMAGE_DIR/* $DOXYGEN_OUTPUT_DIR/html/
-
-echo "Finished!"
-exit;
-
diff --git a/pg-doxy/slp_doxy.css b/pg-doxy/slp_doxy.css
deleted file mode 100644
index 12c03ac..0000000
--- a/pg-doxy/slp_doxy.css
+++ /dev/null
@@ -1,699 +0,0 @@
-/* The standard CSS for doxygen */
-
-body, table, div, p, dl {
- font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
- font-size: 12px;
-}
-
-/* @group Heading Levels */
-
-h1 {
- font-size: 18pt;
- color: #3366ED;
-}
-
-h1.pg {
- font-size: 18pt;
- color: #336666;
- margin-right:-0.6pt;
- margin-left:0cm;
- padding-top:0cm;
- padding-right:0cm;
- padding-bottom:1pt;
- padding-left:0cm;
- border-bottom-width:1.5pt;
- border-bottom-color:#336666;
- border-top-style:none;
- border-right-style:none;
- border-bottom-style:solid;
- border-left-style:none;
-}
-
-h2 {
- font-size: 14pt;
- color: #336666;
-}
-h2.pg {
- font-size: 14pt;
- color: #336666;
- margin-right:-0.1pt;
- margin-left:0cm;
- padding-top:0cm;
- padding-right:0cm;
- padding-bottom:1pt;
- padding-left:0cm;
- border-bottom-width:1.2pt;
- border-bottom-color:#336666;
- border-top-style:none;
- border-right-style:none;
- border-bottom-style:solid;
- border-left-style:none;
-}
-
-
-h3 {
- font-size: 12pt;
- color: #336666;
-}
-h3.pg {
- font-size: 12pt;
- color: #336666;
-}
-
-
-
-dt {
- font-weight: bold;
-}
-
-div.multicol {
- -moz-column-gap: 1em;
- -webkit-column-gap: 1em;
- -moz-column-count: 3;
- -webkit-column-count: 3;
-}
-
-p.startli, p.startdd, p.starttd {
- margin-top: 2px;
-}
-
-p.endli {
- margin-bottom: 0px;
-}
-
-p.enddd {
- margin-bottom: 4px;
-}
-
-p.endtd {
- margin-bottom: 2px;
-}
-
-/* @end */
-
-caption {
- font-weight: bold;
-}
-
-span.legend {
- font-size: 70%;
- text-align: center;
-}
-
-h3.version {
- font-size: 90%;
- text-align: center;
-}
-
-div.qindex, div.navtab{
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
- text-align: center;
- margin: 2px;
- padding: 2px;
-}
-
-div.qindex, div.navpath {
- width: 100%;
- line-height: 140%;
-}
-
-div.navtab {
- margin-right: 15px;
-}
-
-/* @group Link Styling */
-
-a {
- color: #3D578C;
- font-weight: normal;
- text-decoration: none;
-}
-
-.contents a:visited {
- color: #4665A2;
-}
-
-a:hover {
- text-decoration: underline;
-}
-
-a.qindex {
- font-weight: bold;
-}
-
-a.qindexHL {
- font-weight: bold;
- background-color: #9CAFD4;
- color: #ffffff;
- border: 1px double #869DCA;
-}
-
-.contents a.qindexHL:visited {
- color: #ffffff;
-}
-
-a.el {
- font-weight: bold;
-}
-
-a.elRef {
-}
-
-a.code {
- color: #4665A2;
-}
-
-a.codeRef {
- color: #4665A2;
-}
-
-/* @end */
-
-dl.el {
- margin-left: -1cm;
-}
-
-.fragment {
- font-family: monospace, fixed;
- font-size: 105%;
-}
-
-pre.fragment {
- border: 1px solid #C4CFE5;
- background-color: #FBFCFD;
- padding: 4px 6px;
- margin: 4px 8px 4px 2px;
- overflow: auto;
- word-wrap: break-word;
- font-size: 9pt;
- line-height: 125%;
-}
-
-div.ah {
- background-color: black;
- font-weight: bold;
- color: #ffffff;
- margin-bottom: 3px;
- margin-top: 3px
- padding: .2em;
- border: solid thin #333;
- border-radius: .5em;
- -webkit-border-radius: .5em;
- -moz-border-radius: .5em;
- -webkit-box-shadow: 2px 2px 3px #999;
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
- background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
-}
-
-div.groupHeader {
- margin-left: 16px;
- margin-top: 12px;
- margin-bottom: 6px;
- font-weight: bold;
-}
-
-div.groupText {
- margin-left: 16px;
- font-style: italic;
-}
-
-body {
- background: white;
- color: black;
- margin: 0;
-}
-
-div.contents {
- margin-top: 10px;
- margin-left: 10px;
- margin-right: 10px;
-}
-
-td.indexkey {
- background-color: #EBEFF6;
- font-weight: bold;
- border: 1px solid #C4CFE5;
- margin: 2px 0px 2px 0;
- padding: 2px 10px;
-}
-
-td.indexvalue {
- background-color: #EBEFF6;
- border: 1px solid #C4CFE5;
- padding: 2px 10px;
- margin: 2px 0px;
-}
-
-tr.memlist {
- background-color: #EEF1F7;
-}
-
-p.formulaDsp {
- text-align: center;
-}
-
-img.formulaDsp {
-
-}
-
-img.formulaInl {
- vertical-align: middle;
-}
-
-div.center {
- text-align: center;
- margin-top: 0px;
- margin-bottom: 0px;
- padding: 0px;
-}
-
-div.center img {
- border: 0px;
-}
-
-address.footer {
- text-align: right;
- padding-right: 12px;
-}
-
-img.footer {
- border: 0px;
- vertical-align: middle;
-}
-
-/* @group Code Colorization */
-
-span.keyword {
- color: #008000
-}
-
-span.keywordtype {
- color: #604020
-}
-
-span.keywordflow {
- color: #e08000
-}
-
-span.comment {
- color: #800000
-}
-
-span.preprocessor {
- color: #806020
-}
-
-span.stringliteral {
- color: #002080
-}
-
-span.charliteral {
- color: #008080
-}
-
-span.vhdldigit {
- color: #ff00ff
-}
-
-span.vhdlchar {
- color: #000000
-}
-
-span.vhdlkeyword {
- color: #700070
-}
-
-span.vhdllogic {
- color: #ff0000
-}
-
-/* @end */
-
-/*
-.search {
- color: #003399;
- font-weight: bold;
-}
-
-form.search {
- margin-bottom: 0px;
- margin-top: 0px;
-}
-
-input.search {
- font-size: 75%;
- color: #000080;
- font-weight: normal;
- background-color: #e8eef2;
-}
-*/
-
-td.tiny {
- font-size: 75%;
-}
-
-.dirtab {
- padding: 4px;
- border-collapse: collapse;
- border: 1px solid #A3B4D7;
-}
-
-th.dirtab {
- background: #EBEFF6;
- font-weight: bold;
-}
-
-hr {
- height: 0px;
- border: none;
- border-top: 1px solid #4A6AAA;
-}
-
-hr.footer {
- height: 1px;
-}
-
-/* @group Member Descriptions */
-
-table.memberdecls {
- border-spacing: 0px;
- padding: 0px;
-}
-
-.mdescLeft, .mdescRight,
-.memItemLeft, .memItemRight,
-.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
- background-color: #F9FAFC;
- border: none;
- margin: 4px;
- padding: 1px 0 0 8px;
-}
-
-.mdescLeft, .mdescRight {
- padding: 0px 8px 4px 8px;
- color: #555;
-}
-
-.memItemLeft, .memItemRight, .memTemplParams {
- border-top: 1px solid #C4CFE5;
-}
-
-.memItemLeft, .memTemplItemLeft {
- white-space: nowrap;
-}
-
-.memTemplParams {
- color: #4665A2;
- white-space: nowrap;
-}
-
-/* @end */
-
-/* @group Member Details */
-
-/* Styles for detailed member documentation */
-
-.memtemplate {
- font-size: 80%;
- color: #4665A2;
- font-weight: normal;
- margin-left: 3px;
-}
-
-.memnav {
- background-color: #EBEFF6;
- border: 1px solid #A3B4D7;
- text-align: center;
- margin: 2px;
- margin-right: 15px;
- padding: 2px;
-}
-
-.memitem {
- padding: 0;
- margin-bottom: 10px;
-}
-
-.memname {
- white-space: nowrap;
- font-weight: bold;
- margin-left: 6px;
-}
-
-.memproto {
- border-top: 1px solid #A8B8D9;
- border-left: 1px solid #A8B8D9;
- border-right: 1px solid #A8B8D9;
- padding: 6px 0px 6px 0px;
- color: #253555;
- font-weight: bold;
- text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
- /* firefox specific markup */
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
- -moz-border-radius-topright: 8px;
- -moz-border-radius-topleft: 8px;
- /* webkit specific markup */
- -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
- -webkit-border-top-right-radius: 8px;
- -webkit-border-top-left-radius: 8px;
- background-image:url('nav_f.png');
- background-repeat:repeat-x;
- background-color: #E2E8F2;
-
-}
-
-.memdoc {
- border-bottom: 1px solid #A8B8D9;
- border-left: 1px solid #A8B8D9;
- border-right: 1px solid #A8B8D9;
- padding: 2px 5px;
- background-color: #FBFCFD;
- border-top-width: 0;
- /* firefox specific markup */
- -moz-border-radius-bottomleft: 8px;
- -moz-border-radius-bottomright: 8px;
- -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
- background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F8 95%, #F0);
- /* webkit specific markup */
- -webkit-border-bottom-left-radius: 8px;
- -webkit-border-bottom-right-radius: 8px;
- -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
- background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0));
-}
-
-.paramkey {
- text-align: right;
-}
-
-.paramtype {
- white-space: nowrap;
-}
-
-.paramname {
- color: #602020;
- white-space: nowrap;
-}
-.paramname em {
- font-style: normal;
-}
-
-/* @end */
-
-/* @group Directory (tree) */
-
-/* for the tree view */
-
-.ftvtree {
- font-family: sans-serif;
- margin: 0px;
-}
-
-/* these are for tree view when used as main index */
-
-.directory {
- font-size: 9pt;
- font-weight: bold;
- margin: 5px;
-}
-
-.directory h3 {
- margin: 0px;
- margin-top: 1em;
- font-size: 11pt;
-}
-
-/*
-The following two styles can be used to replace the root node title
-with an image of your choice. Simply uncomment the next two styles,
-specify the name of your image and be sure to set 'height' to the
-proper pixel height of your image.
-*/
-
-/*
-.directory h3.swap {
- height: 61px;
- background-repeat: no-repeat;
- background-image: url("yourimage.gif");
-}
-.directory h3.swap span {
- display: none;
-}
-*/
-
-.directory > h3 {
- margin-top: 0;
-}
-
-.directory p {
- margin: 0px;
- white-space: nowrap;
-}
-
-.directory div {
- display: none;
- margin: 0px;
-}
-
-.directory img {
- vertical-align: -30%;
-}
-
-/* these are for tree view when not used as main index */
-
-.directory-alt {
- font-size: 100%;
- font-weight: bold;
-}
-
-.directory-alt h3 {
- margin: 0px;
- margin-top: 1em;
- font-size: 11pt;
-}
-
-.directory-alt > h3 {
- margin-top: 0;
-}
-
-.directory-alt p {
- margin: 0px;
- white-space: nowrap;
-}
-
-.directory-alt div {
- display: none;
- margin: 0px;
-}
-
-.directory-alt img {
- vertical-align: -30%;
-}
-
-/* @end */
-
-div.dynheader {
- margin-top: 8px;
-}
-
-address {
- font-style: normal;
- color: #2A3D61;
-}
-
-table.doxtable {
- border-collapse:collapse;
-}
-
-table.doxtable td, table.doxtable th {
- border: 1px solid #2D4068;
- padding: 3px 7px 2px;
-}
-
-table.doxtable th {
- background-color: #374F7F;
- color: #FFFFFF;
- font-size: 110%;
- padding-bottom: 4px;
- padding-top: 5px;
- text-align:left;
-}
-
-.tabsearch {
- top: 0px;
- left: 10px;
- height: 36px;
- background-image: url('tab_b.png');
- z-index: 101;
- overflow: hidden;
- font-size: 13px;
-}
-
-.navpath ul
-{
- font-size: 11px;
- background-image:url('tab_b.png');
- background-repeat:repeat-x;
- height:30px;
- line-height:30px;
- color:#8AA0CC;
- border:solid 1px #C2CDE4;
- overflow:hidden;
- margin:0px;
- padding:0px;
-}
-
-.navpath li
-{
- list-style-type:none;
- float:left;
- padding-left:10px;
- padding-right: 15px;
- background-image:url('bc_s.png');
- background-repeat:no-repeat;
- background-position:right;
- color:#364D7C;
-}
-
-.navpath a
-{
- height:32px;
- display:block;
- text-decoration: none;
- outline: none;
-}
-
-.navpath a:hover
-{
- color:#6884BD;
-}
-
-div.summary
-{
- float: right;
- font-size: 8pt;
- padding-right: 5px;
- width: 50%;
- text-align: right;
-}
-
-div.summary a
-{
- white-space: nowrap;
-}
-
-div.header
-{
- background-image:url('nav_h.png');
- background-repeat:repeat-x;
- background-color: #F9FAFC;
- margin: 0px;
- border-bottom: 1px solid #C4CFE5;
-}
-
-div.headertitle
-{
- padding: 5px 5px 5px 10px;
-}
-
diff --git a/pg-doxy/tool/bin/doxygen b/pg-doxy/tool/bin/doxygen
deleted file mode 100755
index 3662da8..0000000
--- a/pg-doxy/tool/bin/doxygen
+++ /dev/null
Binary files differ
diff --git a/pg-doxy/tool/bin/doxytag b/pg-doxy/tool/bin/doxytag
deleted file mode 100755
index adb0c90..0000000
--- a/pg-doxy/tool/bin/doxytag
+++ /dev/null
Binary files differ
diff --git a/pg-doxy/tool/man/man1/doxygen.1 b/pg-doxy/tool/man/man1/doxygen.1
deleted file mode 100644
index a3d8c9a..0000000
--- a/pg-doxy/tool/man/man1/doxygen.1
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH DOXYGEN "1" "July 2010" "doxygen 1.7.0" "User Commands"
-.SH NAME
-doxygen \- documentation system for various programming languages
-.SH DESCRIPTION
-Doxygen is a documentation system for C++, C, Java, Objective-C, IDL
-(Corba and Microsoft flavors) and to some extent PHP, C#, and D.
-.PP
-You can use doxygen in a number of ways:
-.TP
-1) Use doxygen to generate a template configuration file:
-.IP
-doxygen [-s] \fB\-g\fR [configName]
-.IP
-If - is used for configName doxygen will write to standard output.
-.TP
-2) Use doxygen to update an old configuration file:
-.IP
-doxygen [-s] \fB\-u\fR [configName]
-.TP
-3) Use doxygen to generate documentation using an existing configuration file:
-.IP
-doxygen [configName]
-.IP
-If - is used for configName doxygen will read from standard input.
-.TP
-4) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
-.TP
-RTF:
-doxygen \fB\-w\fR rtf styleSheetFile
-.TP
-HTML:
-doxygen \fB\-w\fR html headerFile footerFile styleSheetFile [configFile]
-.TP
-LaTeX: doxygen \fB\-w\fR latex headerFile styleSheetFile [configFile]
-.TP
-5) Use doxygen to generate an rtf extensions file
-.TP
-RTF:
-doxygen \fB\-e\fR rtf extensionsFile
-.PP
-If \fB\-s\fR is specified the comments in the config file will be omitted.
-If configName is omitted `Doxyfile' will be used as a default.
-.SH AUTHOR
-Doxygen version 1.7.0, Copyright Dimitri van Heesch 1997-2007
-.SH SEE ALSO
-doxytag(1), doxywizard(1).
diff --git a/pg-doxy/tool/man/man1/doxytag.1 b/pg-doxy/tool/man/man1/doxytag.1
deleted file mode 100644
index f496899..0000000
--- a/pg-doxy/tool/man/man1/doxytag.1
+++ /dev/null
@@ -1,21 +0,0 @@
-.TH DOXYTAG "1" "July 2010" "doxytag 1.7.0" "User Commands"
-.SH NAME
-doxytag \- generates a tag file and/or a search index for a set of HTML files
-.SH SYNOPSIS
-.B doxytag
-[\fI-t tag_file\fR] [\fI-s index_file\fR] [ \fIhtml_file \fR[\fIhtml_file\fR...] ]
-.SH DESCRIPTION
-Generates a tag file and/or a search index for a set of HTML files. Use
-doxysearch as a CGI program to search the tag file generated by doxytag.
-.SH OPTIONS
-.TP
-\fB\-t\fR <tag_file>
-Generate tag file <tag_file>.
-.TP
-\fB\-s\fR <index_file>
-Generate search index <index_file>.
-.PP
-If no HTML files are given all files in the current dir that
-have a .html extension are parsed.
-.SH SEE ALSO
-doxygen(1), doxywizard(1).
diff --git a/src/feedback-internal.c b/src/feedback-internal.c
new file mode 100644
index 0000000..8b73987
--- /dev/null
+++ b/src/feedback-internal.c
@@ -0,0 +1,524 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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 <stdbool.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <mm_sound_private.h>
+#include <vconf.h>
+#include <haptic.h>
+
+#include <fcntl.h>
+#include <errno.h>
+
+#include "feedback.h"
+#include "feedback-internal.h"
+#include "feedback-file.h"
+#include "feedback-log.h"
+
+#define FEEDBACK_RETRY_CNT 1
+#define MAX_FILE_PATH 512
+
+static int soundon = -1;
+static int noti_level = -1;
+static int vib_level = -1;
+static int sndstatus = -1;
+static int vibstatus = -1;
+static int callstatus = -1;
+
+static void __feedback_soundon_cb(keynode_t *key, void* data)
+{
+ soundon = vconf_keynode_get_int(key);
+ FEEDBACK_LOG("[[[[[[[[[[[[[[soundon changed!! new soundon => %d", soundon);
+ return;
+}
+
+static void __feedback_vib_cb(keynode_t *key, void* data)
+{
+ vib_level = vconf_keynode_get_int(key);
+ FEEDBACK_LOG("[[[[[[[[[[[[[[vib_level changed!! new vib_level => %d", vib_level);
+ return;
+}
+
+static void __feedback_noti_cb(keynode_t *key, void* data)
+{
+ noti_level = vconf_keynode_get_int(key);
+ FEEDBACK_LOG("[[[[[[[[[[[[[[noti_level changed!! new noti_level => %d", noti_level);
+ return;
+}
+
+static void __feedback_sndstatus_cb(keynode_t *key, void* data)
+{
+ sndstatus = vconf_keynode_get_bool(key);
+ FEEDBACK_LOG("[[[[[[[[[[[[[[sndstatus changed!! new sndstatus => %d", sndstatus);
+ return;
+}
+
+static void __feedback_vibstatus_cb(keynode_t *key, void* data)
+{
+ vibstatus = vconf_keynode_get_bool(key);
+ FEEDBACK_LOG("[[[[[[[[[[[[[[vibstatus changed!! new vibstatus => %d", vibstatus);
+ return;
+}
+
+static void __feedback_callstatus_cb(keynode_t *key, void* data)
+{
+ callstatus = vconf_keynode_get_int(key);
+ FEEDBACK_LOG("[[[[[[[[[[[[[[callstatus changed!! new callstatus => %d", callstatus);
+ return;
+}
+
+static feedback_pattern_e __feedback_get_alert_on_call_key(feedback_pattern_e pattern)
+{
+ switch(pattern) {
+ case FEEDBACK_PATTERN_MESSAGE:
+ case FEEDBACK_PATTERN_EMAIL:
+ case FEEDBACK_PATTERN_WAKEUP:
+ case FEEDBACK_PATTERN_SCHEDULE:
+ case FEEDBACK_PATTERN_TIMER:
+ case FEEDBACK_PATTERN_GENERAL:
+ case FEEDBACK_PATTERN_CHARGERCONN:
+ case FEEDBACK_PATTERN_FULLCHARGED:
+ case FEEDBACK_PATTERN_LOWBATT:
+ return (feedback_pattern_e)(pattern+1);
+ default:
+ break;
+ }
+
+ return pattern;
+}
+
+static haptic_priority_e __feedback_get_priority(feedback_pattern_e pattern)
+{
+ if (pattern >= FEEDBACK_PATTERN_TAP && pattern <= FEEDBACK_PATTERN_HW_HOLD)
+ return HAPTIC_PRIORITY_MIN;
+
+ return HAPTIC_PRIORITY_MIDDLE;
+}
+
+static volume_type_t __feedback_get_volume_type(feedback_pattern_e pattern)
+{
+ if (pattern == FEEDBACK_PATTERN_TAP)
+ return VOLUME_TYPE_SYSTEM|VOLUME_GAIN_TOUCH;
+ else if (pattern >= FEEDBACK_PATTERN_KEY0 && pattern <= FEEDBACK_PATTERN_KEY_SHARP)
+ return VOLUME_TYPE_SYSTEM|VOLUME_GAIN_DIALER;
+ else if (pattern == FEEDBACK_PATTERN_VOLUME_KEY)
+ return VOLUME_TYPE_RINGTONE;
+
+ return VOLUME_TYPE_SYSTEM;
+}
+
+static int __feedback_get_haptic_level(feedback_pattern_e pattern)
+{
+ int level = -1;
+
+ if (pattern >= FEEDBACK_PATTERN_MESSAGE && pattern <= FEEDBACK_PATTERN_GENERAL_ON_CALL)
+ level = noti_level;
+ else
+ level = vib_level;
+
+ FEEDBACK_LOG("Call status : %d, pattern : %d, level : %d", callstatus, pattern, level);
+ if (callstatus != VCONFKEY_CALL_OFF) {
+ pattern = __feedback_get_alert_on_call_key(pattern);
+ FEEDBACK_LOG("Call status is connected or connecting. pattern changed : %d", pattern);
+
+ // if call status is ON, vibration magnitude is 20%
+ level = (int)(level*0.2f);
+ level = (level < 1) ? 1 : level;
+ FEEDBACK_LOG("level changed : %d", level);
+ }
+
+ // START : Temporary code
+ // Casue : Setting vconf of intensity(feedback) is between 0 and 5.
+ // the vconf will be changed but not yet.
+ level = level*20;
+ // END
+
+ return level;
+}
+
+static bool __feedback_get_always_alert_case(feedback_pattern_e pattern)
+{
+ switch(pattern) {
+ case FEEDBACK_PATTERN_WAKEUP:
+ case FEEDBACK_PATTERN_WAKEUP_ON_CALL:
+ return true;
+ default:
+ break;
+ }
+ return false;
+}
+
+static int __feedback_change_symlink(const char *sym_path, const char *new_path)
+{
+ struct stat buf;
+
+ if (sym_path == NULL || strlen(sym_path) == 0) {
+ FEEDBACK_ERROR("Invalid parameter : sym_path(NULL)");
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (new_path == NULL || strlen(new_path) == 0) {
+ FEEDBACK_ERROR("Invalid paramter : new_path(NULL)");
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ // check symbolic link file existence
+ if (stat(sym_path, &buf)) {
+ FEEDBACK_ERROR("file(%s) is not presents", sym_path);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ if (unlink(sym_path) < 0) {
+ FEEDBACK_LOG("unlink(%s) : %s", sym_path, strerror(errno));
+ }
+
+ if (symlink(new_path, sym_path) < 0) {
+ FEEDBACK_ERROR("symlink(%s) : %s", sym_path, strerror(errno));
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+static int __feedback_restore_default_file(feedback_type_e type, feedback_pattern_e pattern)
+{
+ const char *cur_path = NULL;
+ char default_path[MAX_FILE_PATH] = {0,};
+ char *temp = NULL;
+ int ret = -1;
+
+ if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) {
+ FEEDBACK_ERROR("Invalid parameter : type(%d)", type);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) {
+ FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (type == FEEDBACK_TYPE_SOUND) {
+ cur_path = snd_file[pattern];
+ } else {
+ cur_path = haptic_file[pattern];
+ }
+
+ // if there isn't cur_path, it already returns before calling this api
+ if (cur_path == NULL || strlen(cur_path) == 0) {
+ FEEDBACK_ERROR("Invalid parameter : cur_path(NULL)");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ temp = strcat(default_path, FEEDBACK_ORIGIN_DATA_DIR);
+ strcat(temp, cur_path+strlen(FEEDBACK_DATA_DIR));
+ FEEDBACK_LOG("default_path : %s", default_path);
+
+ ret = __feedback_change_symlink(cur_path, default_path);
+ if (FEEDBACK_FAILED(ret)) {
+ FEEDBACK_ERROR("change_symlink is failed");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+int _feedback_init(feedback_h *handle)
+{
+ haptic_device_h v_handle = NULL;
+ int ret = -1;
+
+ /* Sound Init */
+ if (vconf_get_int(VCONFKEY_SOUND_STATUS, &soundon) < 0) {
+ FEEDBACK_ERROR("vconf_get_int(VCONFKEY_SOUND_STATUS, &soundon) ==> FAIL!!");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sndstatus) < 0) {
+ FEEDBACK_ERROR("vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sndstatus) ==> FAIL!!");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ /* check vibration status */
+ if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) < 0) {
+ FEEDBACK_ERROR("vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) ==> FAIL!!");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ /* check vib_level */
+ if (vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &vib_level) < 0) {
+ FEEDBACK_ERROR("vconf_get_int(VCONFKEY_FEEDBACK_VIBRATION_LEVEL_INT, &vib_level) ==> FAIL!!");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ /* check noti_level */
+ if (vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, &noti_level) < 0) {
+ FEEDBACK_ERROR("vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, &noti_level) ==> FAIL!!");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ /* check call status */
+ if (vconf_get_int(VCONFKEY_CALL_STATE, &callstatus) < 0) {
+ FEEDBACK_ERROR("vconf_get_int(VCONFKEY_CALL_STATE, &callstatus) ==> FAIL!!");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ /* Vibration Init */
+ ret = haptic_open(HAPTIC_DEVICE_ALL, &v_handle);
+ if (ret != HAPTIC_ERROR_NONE) {
+ FEEDBACK_ERROR("haptic_open(HAPTIC_DEVICE_ALL, &v_handle) ==> FAIL!! : %d", ret);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ /* add watch for status value */
+ vconf_notify_key_changed(VCONFKEY_SOUND_STATUS, __feedback_soundon_cb, NULL);
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, __feedback_sndstatus_cb, NULL);
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, __feedback_vibstatus_cb, NULL);
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, __feedback_vib_cb, NULL);
+ vconf_notify_key_changed(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, __feedback_noti_cb, NULL);
+ vconf_notify_key_changed(VCONFKEY_CALL_STATE, __feedback_callstatus_cb, NULL);
+
+ FEEDBACK_LOG("vconf_get_int(VCONFKEY_SOUND_STATUS, &soundon) ==> %d", soundon);
+ FEEDBACK_LOG("vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sndstatus) ==> %d", sndstatus);
+ FEEDBACK_LOG("vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) ==> %d", vibstatus);
+ FEEDBACK_LOG("vconf_get_int(VCONFKEY_FEEDBACK_VIBRATION_LEVEL_INT, &vib_level) ==> %d", vib_level);
+ FEEDBACK_LOG("vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, &noti_level) ==> %d", noti_level);
+ FEEDBACK_LOG("vconf_get_int(VCONFKEY_CALL_STATUS, &callstatus) ==> %d", callstatus);
+
+ *handle = (feedback_h)v_handle;
+ return FEEDBACK_ERROR_NONE;
+}
+
+int _feedback_fini(feedback_h handle)
+{
+ int ret = -1;
+
+ if (handle <= 0) {
+ FEEDBACK_ERROR("Invalid parameter : handle(%d)", handle);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ ret = haptic_close((haptic_device_h)handle);
+ if (ret != HAPTIC_ERROR_NONE) {
+ FEEDBACK_ERROR("haptic_close is failed : %d", ret);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ vconf_ignore_key_changed(VCONFKEY_SOUND_STATUS, __feedback_soundon_cb);
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, __feedback_sndstatus_cb);
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, __feedback_vibstatus_cb);
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, __feedback_vib_cb);
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, __feedback_noti_cb);
+ vconf_ignore_key_changed(VCONFKEY_CALL_STATE, __feedback_callstatus_cb);
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+int _feedback_play_sound(feedback_h handle, feedback_pattern_e pattern)
+{
+ int ret = -1;
+ int retry = FEEDBACK_RETRY_CNT;
+ struct stat buf;
+
+ if (handle <= 0) {
+ FEEDBACK_ERROR("Please call _feedback_init() for sound init ");
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (sndstatus == 0 && !__feedback_get_always_alert_case(pattern)) {
+ FEEDBACK_LOG("Sound condition is OFF (sndstatus : %d)", sndstatus);
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ if (soundon == 1 && pattern >= FEEDBACK_PATTERN_TAP && pattern <= FEEDBACK_PATTERN_HW_HOLD) {
+ FEEDBACK_LOG("Touch feedback sound doesn't work during playing sound");
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ if (pattern == FEEDBACK_PATTERN_NONE) {
+ FEEDBACK_LOG("call _feedback_play_sound passing FEEDBACK_PATTERN_NONE");
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ if (snd_file[pattern] == NULL) {
+ FEEDBACK_LOG("This case(%d) does not play sound", pattern);
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ if (stat(snd_file[pattern], &buf)) {
+ FEEDBACK_ERROR("%s is not presents", snd_file[pattern]);
+ ret = __feedback_restore_default_file(FEEDBACK_TYPE_SOUND, pattern);
+ if (FEEDBACK_FAILED(ret)) {
+ FEEDBACK_ERROR("__feedback_restore_default_file(%d/%d) error", FEEDBACK_TYPE_SOUND, pattern);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+ FEEDBACK_LOG("%s is restored", snd_file[pattern]);
+ }
+
+ FEEDBACK_LOG("Call status : %d, pattern : %d", callstatus, pattern);
+ if (callstatus != VCONFKEY_CALL_OFF) {
+ pattern = __feedback_get_alert_on_call_key(pattern);
+ FEEDBACK_LOG("Call status is connected or connecting. pattern changed : %d", pattern);
+ }
+
+ do {
+ ret = mm_sound_play_keysound(snd_file[pattern], __feedback_get_volume_type(pattern));
+ if (ret == MM_ERROR_NONE) {
+ FEEDBACK_LOG("Play success! SND filename is %s", snd_file[pattern]);
+ return FEEDBACK_ERROR_NONE;
+ }
+ FEEDBACK_ERROR("mm_sound_play_keysound() returned error(%d)", ret);
+ } while(retry--);
+
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+}
+
+int _feedback_play_vibration(feedback_h handle, feedback_pattern_e pattern)
+{
+ int ret = -1;
+ struct stat buf;
+
+ if (handle <= 0) {
+ FEEDBACK_ERROR("Please call _feedback_init() for sound init ");
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (vibstatus == 0 && !__feedback_get_always_alert_case(pattern)) {
+ FEEDBACK_LOG("Vibration condition is OFF (vibstatus : %d)", vibstatus);
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ if (pattern == FEEDBACK_PATTERN_NONE) {
+ FEEDBACK_LOG("call _feedback_play_vibration passing FEEDBACK_PATTERN_NONE");
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ if (haptic_file[pattern] == NULL) {
+ FEEDBACK_LOG("This case(%d) does not play vibration", pattern);
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ if (stat(haptic_file[pattern], &buf)) {
+ FEEDBACK_ERROR("%s is not presents", haptic_file[pattern]);
+ ret = __feedback_restore_default_file(FEEDBACK_TYPE_VIBRATION, pattern);
+ if (FEEDBACK_FAILED(ret)) {
+ FEEDBACK_ERROR("__feedback_restore_default_file(%d/%d) error", FEEDBACK_TYPE_VIBRATION, pattern);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+ FEEDBACK_LOG("%s is restored", haptic_file[pattern]);
+ }
+
+ ret = haptic_vibrate_file_with_detail((haptic_device_h)handle, haptic_file[pattern], HAPTIC_ITERATION_ONCE, __feedback_get_haptic_level(pattern), __feedback_get_priority(pattern), NULL);
+ if (ret != HAPTIC_ERROR_NONE) {
+ FEEDBACK_ERROR("haptic_vibrate_file_with_detail(%s) is failed", haptic_file[pattern]);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+int _feedback_set_path(feedback_type_e type, feedback_pattern_e pattern, char* path)
+{
+ const char* cur_path = NULL;
+ int ret = -1;
+
+ if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) {
+ FEEDBACK_ERROR("Invalid parameter : type(%d)", type);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) {
+ FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (path == NULL) {
+ FEEDBACK_ERROR("Invalid parameter : path(NULL)");
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (access(path, F_OK) != 0) {
+ FEEDBACK_ERROR("Invalid parameter : path does not exist");
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (type == FEEDBACK_TYPE_SOUND) {
+ cur_path = snd_file[pattern];
+ } else {
+ cur_path = haptic_file[pattern];
+ }
+
+ if (cur_path == NULL) {
+ FEEDBACK_ERROR("This pattern(%d) in this type(%d) is not supported to play", pattern, type);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ ret = __feedback_change_symlink(cur_path, path);
+ if (FEEDBACK_FAILED(ret)) {
+ FEEDBACK_ERROR("change_symlink is failed");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+int _feedback_get_path(feedback_type_e type, feedback_pattern_e pattern, char* buf, unsigned int buflen)
+{
+ const char* cur_path = NULL;
+ int retry = FEEDBACK_RETRY_CNT;
+
+ if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) {
+ FEEDBACK_ERROR("Invalid parameter : type(%d)", type);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) {
+ FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (buf == NULL || buflen <= 0) {
+ FEEDBACK_ERROR("Invalid parameter : buf(NULL) or bufLen(%d)", buflen);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (type == FEEDBACK_TYPE_SOUND) {
+ cur_path = snd_file[pattern];
+ } else {
+ cur_path = haptic_file[pattern];
+ }
+
+ if (cur_path == NULL) {
+ FEEDBACK_ERROR("This pattern(%d) in this type(%d) is not supported to play", pattern, type);
+ snprintf(buf, buflen, "NULL");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ do {
+ if(readlink(cur_path, buf, buflen) < 0) {
+ FEEDBACK_ERROR("readlink is failed : %s", strerror(errno));
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+ } while(retry--);
+
+ return FEEDBACK_ERROR_NONE;
+}
diff --git a/src/feedback.c b/src/feedback.c
new file mode 100644
index 0000000..368fbb5
--- /dev/null
+++ b/src/feedback.c
@@ -0,0 +1,168 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include "feedback.h"
+#include "feedback-internal.h"
+#include "feedback-log.h"
+
+#define MAX_PATH_LENGTH 256
+#define NOT_ASSIGNED NULL
+
+#ifndef API
+#define API __attribute__ ((visibility("default")))
+#endif
+
+static feedback_h _feedback_handle = NOT_ASSIGNED;
+
+API int feedback_initialize()
+{
+ int err = -1;
+
+ if (_feedback_handle != NOT_ASSIGNED) {
+ FEEDBACK_LOG("Already initialized");
+ return FEEDBACK_ERROR_NONE;
+ }
+
+ err = _feedback_init(&_feedback_handle);
+ if (FEEDBACK_FAILED(err)) {
+ FEEDBACK_ERROR("_feedback_init is failed");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+API int feedback_deinitialize()
+{
+ int err = -1;
+
+ if (_feedback_handle == NOT_ASSIGNED) {
+ FEEDBACK_ERROR("Not initialized");
+ return FEEDBACK_ERROR_NOT_INITIALIZED;
+ }
+
+ err = _feedback_fini(_feedback_handle);
+ if (FEEDBACK_FAILED(err)) {
+ FEEDBACK_ERROR("_feedback_fini is failed");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ _feedback_handle = NOT_ASSIGNED;
+ return FEEDBACK_ERROR_NONE;
+}
+
+API int feedback_play(feedback_pattern_e pattern)
+{
+ int err = -1;
+
+ if (_feedback_handle == NOT_ASSIGNED) {
+ FEEDBACK_ERROR("Not initialized");
+ return FEEDBACK_ERROR_NOT_INITIALIZED;
+ }
+
+ if (pattern < FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) {
+ FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ err = _feedback_play_sound(_feedback_handle, pattern);
+ if (FEEDBACK_FAILED(err)) {
+ FEEDBACK_ERROR("_feedback_play_sound is failed");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ err = _feedback_play_vibration(_feedback_handle, pattern);
+ if (FEEDBACK_FAILED(err)) {
+ FEEDBACK_ERROR("_feedback_play_vibration is failed");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+API int feedback_play_type(feedback_type_e type, feedback_pattern_e pattern)
+{
+ int err = -1;
+
+ if (_feedback_handle == NOT_ASSIGNED) {
+ FEEDBACK_ERROR("Not initialized");
+ return FEEDBACK_ERROR_NOT_INITIALIZED;
+ }
+
+ if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) {
+ FEEDBACK_ERROR("Invalid parameter : type(%d)", type);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (pattern < FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) {
+ FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ switch(type) {
+ case FEEDBACK_TYPE_SOUND:
+ err = _feedback_play_sound(_feedback_handle, pattern);
+ break;
+ case FEEDBACK_TYPE_VIBRATION:
+ err = _feedback_play_vibration(_feedback_handle, pattern);
+ break;
+ default:
+ FEEDBACK_ERROR("Invalid parameter : type(%d)", type);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (FEEDBACK_FAILED(err)) {
+ FEEDBACK_ERROR("_feedback_play(type:%d) is failed", type);
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ return FEEDBACK_ERROR_NONE;
+}
+
+API int feedback_get_resource_path(feedback_type_e type, feedback_pattern_e pattern, char** path)
+{
+ int err = -1;
+ char buf[MAX_PATH_LENGTH] = {0,};
+
+ if (path == NULL) {
+ FEEDBACK_ERROR("Invalid parameter : path(NULL)");
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) {
+ FEEDBACK_ERROR("Invalid parameter : type(%d)", type);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) {
+ FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern);
+ return FEEDBACK_ERROR_INVALID_PARAMETER;
+ }
+
+ err = _feedback_get_path(type, pattern, buf, MAX_PATH_LENGTH);
+ if (FEEDBACK_FAILED(err)) {
+ FEEDBACK_ERROR("_feedback_get_path is failed");
+ return FEEDBACK_ERROR_OPERATION_FAILED;
+ }
+
+ *path = strdup(buf);
+
+ return FEEDBACK_ERROR_NONE;
+}
diff --git a/src/svi.c b/src/svi.c
new file mode 100644
index 0000000..1f73ae6
--- /dev/null
+++ b/src/svi.c
@@ -0,0 +1,330 @@
+/*
+ * libfeedback
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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 "svi.h"
+#include "feedback.h"
+#include "svi-log.h"
+
+#define SVI_TEMP_HANDLE 1
+
+#ifndef API
+#define API __attribute__ ((visibility("default")))
+#endif
+
+feedback_pattern_e feedback_sound[] = {
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
+ FEEDBACK_PATTERN_TAP,
+ FEEDBACK_PATTERN_TAP,
+ FEEDBACK_PATTERN_TAP,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
+ FEEDBACK_PATTERN_SIP,
+ FEEDBACK_PATTERN_SIP_BACKSPACE,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
+ FEEDBACK_PATTERN_KEY0,
+ FEEDBACK_PATTERN_KEY1,
+ FEEDBACK_PATTERN_KEY2,
+ FEEDBACK_PATTERN_KEY3,
+ FEEDBACK_PATTERN_KEY4,
+ FEEDBACK_PATTERN_KEY5,
+ FEEDBACK_PATTERN_KEY6,
+ FEEDBACK_PATTERN_KEY7,
+ FEEDBACK_PATTERN_KEY8,
+ FEEDBACK_PATTERN_KEY9,
+ FEEDBACK_PATTERN_KEY_STAR,
+ FEEDBACK_PATTERN_KEY_SHARP,
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ FEEDBACK_PATTERN_HOLD,
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ FEEDBACK_PATTERN_MULTI_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ FEEDBACK_PATTERN_HW_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ FEEDBACK_PATTERN_HW_HOLD,
+
+ /* OPERATION : POWER ON/OFF */
+ FEEDBACK_PATTERN_POWERON,
+ FEEDBACK_PATTERN_POWEROFF,
+ /* OPERATION : CHARGECONN */
+ FEEDBACK_PATTERN_CHARGERCONN,
+ /* OPERATION : FULLCHAREGED */
+ FEEDBACK_PATTERN_FULLCHARGED,
+ /* OPERATION : LOW BATTERY */
+ FEEDBACK_PATTERN_LOWBATT,
+ /* OPERATION : LOCK/UNLOCK */
+ FEEDBACK_PATTERN_LOCK,
+ FEEDBACK_PATTERN_UNLOCK,
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
+ FEEDBACK_PATTERN_CALLCONNECT,
+ FEEDBACK_PATTERN_DISCALLCONNECT,
+ /* OPERATION : MINUTE MINDER */
+ FEEDBACK_PATTERN_MINUTEMINDER,
+ /* OPERATION : VIBRATION */
+ FEEDBACK_PATTERN_VIBRATION,
+ /* OPERATION : BALLOON MESSAGE SEND/RECV */
+ FEEDBACK_PATTERN_NONE,
+ FEEDBACK_PATTERN_NONE,
+ /* OPERATION : ON/OFF SLIDER */
+ FEEDBACK_PATTERN_NONE,
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
+ FEEDBACK_PATTERN_SHUTTER,
+ /* OPERATION : LIST RE-ORDER */
+ FEEDBACK_PATTERN_LIST_REORDER,
+ /* OPERATION : LIST SLIDER */
+ FEEDBACK_PATTERN_SLIDER_SWEEP,
+};
+
+feedback_pattern_e feedback_vibration[] = {
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : GENERAL */
+ FEEDBACK_PATTERN_TAP,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : TEXT_NUMERIC_INPUT */
+ FEEDBACK_PATTERN_SIP,
+ FEEDBACK_PATTERN_SIP_BACKSPACE,
+ /* TOUCH : SCREEN TOUCH : TAP(TOUCH & RELEASE) : DAILER */
+ FEEDBACK_PATTERN_KEY0,
+ FEEDBACK_PATTERN_KEY1,
+ FEEDBACK_PATTERN_KEY2,
+ FEEDBACK_PATTERN_KEY3,
+ FEEDBACK_PATTERN_KEY4,
+ FEEDBACK_PATTERN_KEY5,
+ FEEDBACK_PATTERN_KEY6,
+ FEEDBACK_PATTERN_KEY7,
+ FEEDBACK_PATTERN_KEY8,
+ FEEDBACK_PATTERN_KEY9,
+ FEEDBACK_PATTERN_KEY_STAR,
+ FEEDBACK_PATTERN_KEY_SHARP,
+ /* TOUCH : H/W OR SOFT TOUCH : HOLD(TAP & HOLD) */
+ FEEDBACK_PATTERN_HOLD,
+ /* TOUCH : H/W OR SOFT TOUCH : MULTI TAP */
+ FEEDBACK_PATTERN_MULTI_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP */
+ FEEDBACK_PATTERN_HW_TAP,
+ /* TOUCH : H/W OR SOFT TOUCH : TAP & HOLD */
+ FEEDBACK_PATTERN_HW_HOLD,
+
+ /* NOTIFICATION : INCOMING : CALL */
+ FEEDBACK_PATTERN_NONE,
+ FEEDBACK_PATTERN_NONE,
+ FEEDBACK_PATTERN_NONE,
+ FEEDBACK_PATTERN_NONE,
+ FEEDBACK_PATTERN_NONE,
+ FEEDBACK_PATTERN_NONE,
+ /* NOTIFICATION : INCOMING : MESSAGE */
+ FEEDBACK_PATTERN_MESSAGE,
+ /* NOTIFICATION : INCOMING : EMAIL */
+ FEEDBACK_PATTERN_EMAIL,
+ /* NOTIFICATION : ALARM : WAKEUP */
+ FEEDBACK_PATTERN_WAKEUP,
+ /* NOTIFICATION : ALARM : SCHEDULE */
+ FEEDBACK_PATTERN_SCHEDULE,
+ /* NOTIFICATION : ALARM : TIMER */
+ FEEDBACK_PATTERN_TIMER,
+ /* NOTIFICATION : GENERAL(TICKER/IM/SMS ETC) */
+ FEEDBACK_PATTERN_GENERAL,
+
+ /* OPERATION : POWER ON/OFF */
+ FEEDBACK_PATTERN_POWERON,
+ FEEDBACK_PATTERN_POWEROFF,
+ /* OPERATION : CHARGECONN */
+ FEEDBACK_PATTERN_CHARGERCONN,
+ /* OPERATION : FULLCHAREGED */
+ FEEDBACK_PATTERN_FULLCHARGED,
+ /* OPERATION : LOW BATTERY */
+ FEEDBACK_PATTERN_LOWBATT,
+ /* OPERATION : LOCK/UNLOCK */
+ FEEDBACK_PATTERN_LOCK,
+ FEEDBACK_PATTERN_UNLOCK,
+ /* OPERATION : CALL CONNECT/ DISCONNECT */
+ FEEDBACK_PATTERN_CALLCONNECT,
+ FEEDBACK_PATTERN_DISCALLCONNECT,
+ /* OPERATION : MINUTE MINDER */
+ FEEDBACK_PATTERN_MINUTEMINDER,
+ /* OPERATION : VIBRATION */
+ FEEDBACK_PATTERN_VIBRATION,
+ /* OPERATION : BALLOON MESSAGE SEND/RECV */
+ FEEDBACK_PATTERN_NONE,
+ FEEDBACK_PATTERN_NONE,
+ /* OPERATION : ON/OFF SLIDER */
+ FEEDBACK_PATTERN_NONE,
+ /* OPERATION : CAMERA SHUTTER / SCREEN CAPTURE */
+ FEEDBACK_PATTERN_SHUTTER,
+ /* OPERATION : LIST RE-ORDER */
+ FEEDBACK_PATTERN_LIST_REORDER,
+ /* OPERATION : LIST SLIDER */
+ FEEDBACK_PATTERN_SLIDER_SWEEP,
+};
+
+API int svi_init(int *handle)
+{
+ int ret = -1;
+
+ if (handle == NULL) {
+ SVILOG("ERROR!! Invalid parameter : handle(NULL)");
+ return SVI_ERROR;
+ }
+
+ ret = feedback_initialize();
+ if (FEEDBACK_FAILED(ret)) {
+ SVILOG("ERROR!! feedback_initialize is failed");
+ return SVI_ERROR;
+ }
+
+ *handle = SVI_TEMP_HANDLE;
+ return SVI_SUCCESS;
+}
+
+API int svi_fini(int handle)
+{
+ int ret = -1;
+
+ if (handle != SVI_TEMP_HANDLE) {
+ SVILOG("ERROR!! Invalid parameter : handle(%d)", handle);
+ return SVI_ERROR;
+ }
+
+ ret = feedback_deinitialize();
+ if (FEEDBACK_FAILED(ret)) {
+ SVILOG("ERROR!! feedback_deinitialize is failed");
+ return SVI_ERROR;
+ }
+
+ return SVI_SUCCESS;
+}
+
+API int svi_play_sound(int handle, sound_type sound_key)
+{
+ int ret = -1;
+ feedback_pattern_e pattern = FEEDBACK_PATTERN_NONE;
+
+ if (handle != SVI_TEMP_HANDLE) {
+ SVILOG("ERROR!! Invalid parameter : handle(%d)", handle);
+ return SVI_ERROR;
+ }
+
+ if (sound_key < SVI_SND_NONE || sound_key >= SVI_SND_ENUM_END) {
+ SVILOG("ERROR!! Invalid parameter : sound_key(%d)", sound_key);
+ return SVI_ERROR;
+ }
+
+ if (sound_key == SVI_SND_NONE) {
+ pattern = FEEDBACK_PATTERN_NONE;
+ SVILOG("pattern is NONE");
+ } else {
+ pattern = feedback_sound[sound_key];
+ SVILOG("sound_key : %d, pattern : %d", sound_key, pattern);
+ }
+
+ ret = feedback_play_type(FEEDBACK_TYPE_SOUND, pattern);
+ if (FEEDBACK_FAILED(ret)) {
+ SVILOG("ERROR!! feedback_play_type is failed");
+ return SVI_ERROR;
+ }
+
+ return SVI_SUCCESS;
+}
+
+API int svi_play_vib(int handle, vibration_type vibration_key)
+{
+ int ret = -1;
+ feedback_pattern_e pattern = FEEDBACK_PATTERN_NONE;
+
+ if (handle != SVI_TEMP_HANDLE) {
+ SVILOG("ERROR!! Invalid parameter : handle(%d)", handle);
+ return SVI_ERROR;
+ }
+
+ if (vibration_key < SVI_VIB_NONE || vibration_key >= SVI_VIB_ENUM_END) {
+ SVILOG("ERROR!! Invalid parameter : sound_key(%d)", vibration_key);
+ return SVI_ERROR;
+ }
+
+ if (vibration_key == SVI_VIB_NONE) {
+ pattern = FEEDBACK_PATTERN_NONE;
+ SVILOG("pattern is NONE");
+ } else {
+ pattern = feedback_vibration[vibration_key];
+ SVILOG("vibration_key : %d, pattern : %d", vibration_key, pattern);
+ }
+
+ ret = feedback_play_type(FEEDBACK_TYPE_VIBRATION, pattern);
+ if (FEEDBACK_FAILED(ret)) {
+ SVILOG("ERROR!! feedback_play_type is failed");
+ return SVI_ERROR;
+ }
+
+ return SVI_SUCCESS;
+}
+
+API int svi_play(int handle, vibration_type vibration_key, sound_type sound_key)
+{
+ int ret_snd = svi_play_sound(handle, sound_key);
+ int ret_vib = svi_play_vib(handle, vibration_key);
+
+ if (ret_snd == SVI_ERROR || ret_vib == SVI_ERROR) {
+ return SVI_ERROR;
+ } else {
+ return SVI_SUCCESS;
+ }
+}
+
+API int svi_set_path(int svi_type, int svi_enum, char* path)
+{
+ SVILOG("This api is not supported");
+ return SVI_ERROR;
+}
+
+API int svi_get_path(int svi_type, int svi_enum, char* buf, unsigned int bufLen)
+{
+ int ret = -1;
+ feedback_pattern_e pattern = FEEDBACK_PATTERN_NONE;
+ char *path = NULL;
+
+ if (svi_type <= SVI_TYPE_NONE || svi_type >= SVI_TYPE_END) {
+ SVILOG("ERROR!! Invalid parameter : svi_type(%d).", svi_type);
+ return SVI_ERROR;
+ }
+
+ if (svi_type == SVI_TYPE_SND) {
+ if (svi_enum <= SVI_SND_NONE || svi_enum >= SVI_SND_ENUM_END) {
+ SVILOG("ERROR! invalid svi_enum(%d)", svi_enum);
+ return SVI_ERROR;
+ }
+
+ pattern = feedback_sound[svi_enum];
+ ret = feedback_get_resource_path(FEEDBACK_TYPE_SOUND, pattern, &path);
+ } else if (svi_type == SVI_TYPE_VIB) {
+ if (svi_enum <= SVI_VIB_NONE || svi_enum >= SVI_VIB_ENUM_END) {
+ SVILOG("ERROR! invalid svi_enum(%d)", svi_enum);
+ return SVI_ERROR;
+ }
+
+ pattern = feedback_vibration[svi_enum];
+ ret = feedback_get_resource_path(FEEDBACK_TYPE_VIBRATION, pattern, &path);
+ }
+
+ if (FEEDBACK_FAILED(ret)) {
+ SVILOG("ERROR!! feedback_play_type is failed");
+ return SVI_ERROR;
+ }
+
+ snprintf(buf, bufLen, "%s", path);
+ free(path);
+
+ return SVI_SUCCESS;
+}
diff --git a/svi.c b/svi.c
deleted file mode 100755
index 6819ff2..0000000
--- a/svi.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * libsvi
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seokkyu Jang <seokkyu.jang@samsung.com>
- * Contact: Sangil Yoon <si83.yoon@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#define _GNU_SOURCE
-
-#include <stdio.h>
-#include <mm_sound_private.h>
-#include <vconf.h>
-#include <devman_haptic.h>
-
-#include <svi.h>
-#include "svi-log.h"
-
-#define SVI_DATA_DIR "/usr/share/svi"
-#define SVI_SOUND_DIR SVI_DATA_DIR"/sound"
-#define SVI_HAPTIC_DIR SVI_DATA_DIR"/haptic"
-
-#define SOUND_TOUCH_DIR SVI_SOUND_DIR"/touch"
-#define HAPTIC_TOUCH_DIR SVI_HAPTIC_DIR"/touch"
-
-#define HAPTIC_NOTI_DIR SVI_HAPTIC_DIR"/notification"
-
-#define SOUND_OPER_DIR SVI_SOUND_DIR"/operation"
-#define HAPTIC_OPER_DIR SVI_HAPTIC_DIR"/operation"
-
-
-#ifndef API
-#define API __attribute__ ((visibility("default")))
-#endif
-
-//#define PERFORM_CHECK
-
-#ifdef PERFORM_CHECK
-static long long ms = 0;
-
-#define MICROSECONDS(tv) ((tv.tv_sec * 1000000ll) + tv.tv_usec)
-
-#define ESTIMATE_PERFORMANCE() \
- do { \
- struct timeval tv; \
- if (ms == 0) { \
- gettimeofday(&tv, NULL); \
- ms = MICROSECONDS(tv); \
- fprintf(stderr, "%s start time : %lld\n", __func__, ms); \
- } else { \
- gettimeofday(&tv, NULL); \
- fprintf(stderr, "%s elapsed time : %lld\n", __func__, MICROSECONDS(tv) - ms); \
- ms = 0; \
- } \
- } while(0)
-#else
-#define ESTIMATE_PERFORMANCE()
-#endif
-
-const char* snd_file[] = {
- SOUND_TOUCH_DIR"/touch1.wav",
- SOUND_TOUCH_DIR"/touch2.wav",
- SOUND_TOUCH_DIR"/touch3.wav",
- SOUND_TOUCH_DIR"/sip.wav",
- SOUND_TOUCH_DIR"/hold.wav",
- SOUND_TOUCH_DIR"/multi_tap.wav",
- SOUND_TOUCH_DIR"/hw_tap.wav",
- SOUND_TOUCH_DIR"/hw_hold.wav",
-
- SOUND_TOUCH_DIR"/key0.wav",
- SOUND_TOUCH_DIR"/key1.wav",
- SOUND_TOUCH_DIR"/key2.wav",
- SOUND_TOUCH_DIR"/key3.wav",
- SOUND_TOUCH_DIR"/key4.wav",
- SOUND_TOUCH_DIR"/key5.wav",
- SOUND_TOUCH_DIR"/key6.wav",
- SOUND_TOUCH_DIR"/key7.wav",
- SOUND_TOUCH_DIR"/key8.wav",
- SOUND_TOUCH_DIR"/key9.wav",
- SOUND_TOUCH_DIR"/keyasterisk.wav",
- SOUND_TOUCH_DIR"/keysharp.wav",
-
- SOUND_OPER_DIR"/power_on.wav",
- SOUND_OPER_DIR"/power_off.wav",
- SOUND_OPER_DIR"/charger_connection.wav",
- SOUND_OPER_DIR"/fully_charged.wav",
- SOUND_OPER_DIR"/low_battery.wav",
- SOUND_OPER_DIR"/lock.wav",
- SOUND_OPER_DIR"/unlock.wav",
- SOUND_OPER_DIR"/call_connect.wav",
- SOUND_OPER_DIR"/call_disconnect.wav",
- SOUND_OPER_DIR"/minute_minder.wav",
- SOUND_OPER_DIR"/vibration.wav",
- SOUND_OPER_DIR"/new_chat.wav",
- SOUND_OPER_DIR"/sent_chat.wav",
- SOUND_OPER_DIR"/on_off_slider.wav",
- SOUND_OPER_DIR"/shutter.wav",
-};
-
-const char* haptic_file[] = {
- HAPTIC_TOUCH_DIR"/touch.ivt",
- HAPTIC_TOUCH_DIR"/sip.ivt",
- HAPTIC_TOUCH_DIR"/hold.ivt",
- HAPTIC_TOUCH_DIR"/multi_tap.ivt",
- HAPTIC_TOUCH_DIR"/hw_tap.ivt",
- HAPTIC_TOUCH_DIR"/hw_hold.ivt",
-
- HAPTIC_TOUCH_DIR"/key0.ivt",
- HAPTIC_TOUCH_DIR"/key1.ivt",
- HAPTIC_TOUCH_DIR"/key2.ivt",
- HAPTIC_TOUCH_DIR"/key3.ivt",
- HAPTIC_TOUCH_DIR"/key4.ivt",
- HAPTIC_TOUCH_DIR"/key5.ivt",
- HAPTIC_TOUCH_DIR"/key6.ivt",
- HAPTIC_TOUCH_DIR"/key7.ivt",
- HAPTIC_TOUCH_DIR"/key8.ivt",
- HAPTIC_TOUCH_DIR"/key9.ivt",
- HAPTIC_TOUCH_DIR"/keyasterisk.ivt",
- HAPTIC_TOUCH_DIR"/keysharp.ivt",
-
- HAPTIC_NOTI_DIR"/incoming_call1.ivt",
- HAPTIC_NOTI_DIR"/incoming_call2.ivt",
- HAPTIC_NOTI_DIR"/incoming_call3.ivt",
- HAPTIC_NOTI_DIR"/message.ivt",
- HAPTIC_NOTI_DIR"/email.ivt",
- HAPTIC_NOTI_DIR"/wakeup.ivt",
- HAPTIC_NOTI_DIR"/schedule.ivt",
- HAPTIC_NOTI_DIR"/timer.ivt",
- HAPTIC_NOTI_DIR"/general.ivt",
-
- HAPTIC_OPER_DIR"/power_on.ivt",
- HAPTIC_OPER_DIR"/power_off.ivt",
- HAPTIC_OPER_DIR"/charger_connection.ivt",
- HAPTIC_OPER_DIR"/fully_charged.ivt",
- HAPTIC_OPER_DIR"/low_battery.ivt",
- HAPTIC_OPER_DIR"/lock.ivt",
- HAPTIC_OPER_DIR"/unlock.ivt",
- HAPTIC_OPER_DIR"/call_connect.ivt",
- HAPTIC_OPER_DIR"/call_disconnect.ivt",
- HAPTIC_OPER_DIR"/minute_minder.ivt",
- HAPTIC_OPER_DIR"/vibration.ivt",
- HAPTIC_OPER_DIR"/new_chat.ivt",
- HAPTIC_OPER_DIR"/sent_chat.ivt",
- HAPTIC_OPER_DIR"/on_off_slider.ivt",
- HAPTIC_OPER_DIR"/shutter.ivt",
-};
-
-static int soundon = -1;
-static int vib_level = -1;
-static int sndstatus = -1;
-static int vibstatus = -1;
-
-void soundon_cb(keynode_t *key, void* data)
-{
- soundon = vconf_keynode_get_bool(key);
- SVILOG("[[[[[[[[[[[[[[soundon changed!! new soundon => %d\n", soundon);
- return;
-}
-
-void vib_cb(keynode_t *key, void* data)
-{
- vib_level = vconf_keynode_get_int(key);
-
- SVILOG("[[[[[[[[[[[[[[vib_level changed!! new vib_level => %d\n", vib_level);
-
- return;
-}
-
-void sndstatus_cb(keynode_t *key, void* data)
-{
- sndstatus = vconf_keynode_get_int(key);
-
- SVILOG("[[[[[[[[[[[[[[sndstatus changed!! new sndstatus => %d\n", sndstatus);
-
- return;
-}
-
-void vibstatus_cb(keynode_t *key, void* data)
-{
- vibstatus = vconf_keynode_get_bool(key);
-
- SVILOG("[[[[[[[[[[[[[[vibstatus changed!! new vibstatus => %d\n", vibstatus);
-
- return;
-}
-
-
-volume_type_t get_volume_type(sound_type sound_key)
-{
- volume_type_t type = VOLUME_TYPE_SYSTEM;
-
- if (sound_key >= SVI_SND_OPERATION_POWERON && sound_key <= SVI_SND_OPERATION_SCRCAPTURE)
- type = VOLUME_TYPE_SYSTEM;
- else
- type = VOLUME_TYPE_SYSTEM;
-
- return type;
-}
-
-API int svi_init(int *handle)
-{
- int ret_vib = SVI_SUCCESS;
- int v_handle = 0;
-
- /* Sound Init */
- if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &soundon) < 0)
- SVILOG("vconf_get_int(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &soundon) ==> FAIL!!\n");
- SVILOG("vconf_get_int(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &soundon) ==> %d\n", soundon);
-
- if (vconf_get_int("memory/Sound/SoundStatus", &sndstatus) < 0)
- SVILOG("vconf_get_int(memory/Sound/SoundStatus, &sndstatus) ==> FAIL!!\n");
- SVILOG("vconf_get_int(memory/Sound/SoundStatus, &sndstatus) ==> %d\n", sndstatus);
-
- vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, soundon_cb, NULL);
- vconf_notify_key_changed("memory/Sound/SoundStatus", sndstatus_cb, NULL);
-
- /* Vibration Init */
- v_handle = device_haptic_open( DEV_IDX_0 , 0x01); // new haptic lib.
-
- if (v_handle < 0)
- {
- SVILOG("device_haptic_open(DEV_IDX_0) ==> FAIL!!\n");
- ret_vib = SVI_ERROR;
- }
- else
- {
- if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) < 0) //check vibration status
- SVILOG("vconf_get_int(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) ==> FAIL!!\n");
- SVILOG("vconf_get_int(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) ==> %d\n", vibstatus);
-
- if (vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &vib_level) < 0) //check vib_level
- SVILOG("vconf_get_int(VCONFKEY_SETAPPL_VIB_FEEDBACK_INT, &vib_level) ==> FAIL!!\n");
- SVILOG("vconf_get_int(VCONFKEY_SETAPPL_VIB_FEEDBACK_INT, &vib_level) ==> %d\n", vib_level);
-
- vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, vibstatus_cb, NULL);
- vconf_notify_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, vib_cb, NULL);
- ret_vib = SVI_SUCCESS;
- }
-
- if (ret_vib == SVI_ERROR) {
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, soundon_cb);
- vconf_ignore_key_changed("memory/Sound/SoundStatus", sndstatus_cb);
- return SVI_ERROR;
- } else {
- *handle = v_handle;
- return SVI_SUCCESS;
- }
-}
-
-API int svi_fini(int handle)
-{
- int ret_vib = SVI_SUCCESS;
-
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, soundon_cb);
- vconf_ignore_key_changed("memory/Sound/SoundStatus", sndstatus_cb);
-
- if (handle > 0) {
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, vibstatus_cb);
- vconf_ignore_key_changed(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, vib_cb);
- if (device_haptic_close(handle) < 0) {
- ret_vib = SVI_ERROR;
- } else {
- ret_vib = SVI_SUCCESS;
- }
- }
-
- if ( ret_vib == SVI_ERROR) {
- return SVI_ERROR;
- } else {
- return SVI_SUCCESS;
- }
-}
-
-API int svi_play_sound(int handle, sound_type sound_key)
-{
- int ret_snd = SVI_SUCCESS;
- struct stat buf;
- SVILOG("sound_key = %d\n", sound_key);
-
- if (handle < 0) {
- SVILOG("ERROR!! Please call svi_init() for sound init \n");
- ret_snd = SVI_ERROR;
- }
- else
- {
- if (sound_key > SVI_SND_NONE && sound_key <= SVI_SND_OPERATION_SCRCAPTURE)
- {
- SVILOG("soundon = %d, sndstatus = %d \n", soundon, sndstatus);
- if (soundon != 0 && sndstatus == 0)
- {
- if(stat(snd_file[sound_key], &buf)) { /*check file existence*/
- SVILOG("ERROR!! %s is not presents\n", snd_file[sound_key]);
- return SVI_ERROR;
- }
- if (mm_sound_play_keysound(snd_file[sound_key], get_volume_type(sound_key)) < 0)
- {
- SVILOG("ERROR!! mm_sound_play_keysound() returned error.\n");
- ret_snd = SVI_ERROR;
- }
- SVILOG("SND filename is %s\n", snd_file[sound_key]);
- }
- }
- else if (sound_key != SVI_SND_NONE) {
- ret_snd = SVI_ERROR;
- }
- }
-
- return ret_snd;
-}
-
-API int svi_play_vib(int handle, vibration_type vibration_key)
-{
- int ret_vib = SVI_SUCCESS;
- struct stat buf;
-
- SVILOG("vibration key - %d\n", vibration_key);
-
- if (handle < 0) {
- SVILOG("ERROR!! Please call svi_init() for vibration init \n");
- ret_vib = SVI_ERROR;
- } else {
- if (vibration_key > SVI_VIB_NONE && vibration_key <= SVI_VIB_OPERATION_SHUTTER) {
- if (vibration_key == SVI_VIB_OPERATION_FULLYCHARGED || vibration_key == SVI_VIB_OPERATION_LOTBATT) {
- SVILOG("vibration type is SVI_VIB_OPERATION_FULLYCHARGED or SVI_VIB_OPERATION_LOTBATT\n");
- if (device_haptic_play_file(handle, haptic_file[vibration_key], 1, 5) < 0) {
- SVILOG("ERROR!! device_haptic_play_file() returned error.\n");
- ret_vib = SVI_ERROR;
- }
- SVILOG("device_haptic_play_file(handle, vibration_key, 1, 5)\n");
- } else {
- SVILOG("vibstatus = %d, vib_level = %d\n", vibstatus, vib_level);
- if (vibstatus != 0) {
- if(stat(haptic_file[vibration_key], &buf)) { /*check file existence*/
- SVILOG("ERROR!! %s is not presents\n", haptic_file[vibration_key]);
- return SVI_ERROR;
- }
- if (device_haptic_play_file(handle, haptic_file[vibration_key], 1, vib_level) < 0) {
- SVILOG("ERROR!! device_haptic_play_file() returned error.\n");
- ret_vib = SVI_ERROR;
- }
- SVILOG("device_haptic_play_file(handle, vibration_key, 1, %d)\n", vib_level);
- }
- }
- }
- else if (vibration_key != SVI_VIB_NONE) {
- ret_vib = SVI_ERROR;
- }
- }
-
- return ret_vib;
-
-}
-
-API int svi_play(int handle, vibration_type vibration_key, sound_type sound_key)
-{
- int ret_snd = svi_play_sound(handle, sound_key);
- int ret_vib = svi_play_vib(handle, vibration_key);
-
- if (ret_snd == SVI_ERROR || ret_vib == SVI_ERROR) {
- return SVI_ERROR;
- } else {
- return SVI_SUCCESS;
- }
-}
-
-API int svi_get_path(int svi_type, int svi_enum, char* buf, unsigned int bufLen)
-{
- vibration_type vib_enum_type = SVI_VIB_NONE;
- sound_type snd_enum_type = SVI_SND_NONE;
- unsigned int pathLen = 0;
-
- SVILOG("starts\n");
-
- if (buf == NULL || bufLen <= 0) {
- SVILOG("ERROR!! invalid input parameters.\n");
- return SVI_ERROR;
- }
-
- if (!(svi_type == SVI_TYPE_SND || svi_type == SVI_TYPE_VIB)) {
- SVILOG("ERROR!! invalid svi_type(%d).\n", svi_type);
- return SVI_ERROR;
- }
-
-
- if (svi_type == SVI_TYPE_SND) {
- snd_enum_type = (sound_type)svi_enum;
-
- if (snd_enum_type < SVI_SND_TOUCH_TOUCH1 || snd_enum_type> SVI_SND_OPERATION_SCRCAPTURE) {
- SVILOG("ERROR! invalid svi_enum(%d)\n", snd_enum_type);
- return SVI_ERROR;
- }
- pathLen = strlen(snd_file[snd_enum_type]);
- if (pathLen <= 0) {
- SVILOG("ERROR!! NULL path.\n");
- return SVI_ERROR;
- }
- if (pathLen < bufLen) {
- strncpy(buf, snd_file[snd_enum_type], bufLen);
- } else {
- SVILOG("ERROR!! Overflow.\n");
- return SVI_ERROR;
- }
- } else if (svi_type == SVI_TYPE_VIB) {
- vib_enum_type = (vibration_type) svi_enum;
- if (vib_enum_type < SVI_VIB_TOUCH_TOUCH || vib_enum_type > SVI_VIB_OPERATION_SHUTTER) {
- SVILOG("ERROR! invalid svi_enum(%d)\n", vib_enum_type);
- return SVI_ERROR;
- }
- pathLen = strlen(haptic_file[vib_enum_type]);
- if (pathLen <= 0) {
- SVILOG("ERROR!! NULL path.\n");
- return SVI_ERROR;
- }
- if (pathLen < bufLen) {
- strncpy(buf, haptic_file[vib_enum_type], bufLen);
- } else {
- SVILOG("ERROR!! Overflow.\n");
- return SVI_ERROR;
- }
- }
-
- SVILOG("ends\n");
- return SVI_SUCCESS;
-}
-
diff --git a/svi.pc.in b/svi.pc.in
index 619e337..9ec1dcf 100755..100644
--- a/svi.pc.in
+++ b/svi.pc.in
@@ -1,11 +1,11 @@
prefix=@PREFIX@
exec_prefix=@EXEC_PREFIX@
libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
+includedir=/usr/include/svi
Name: svi
Description: configuration system library
Version: @VERSION@
-Requires: vconf mm-keysound devman_haptic dlog
+Requires:
Libs: -L${libdir} -lsvi
Cflags: -I${includedir}
diff --git a/test/svi_test.c b/test/svi_test.c
deleted file mode 100755
index 6ced888..0000000
--- a/test/svi_test.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * libsvi
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seokkyu Jang <seokkyu.jang@samsung.com>
- * Contact: Sangil Yoon <si83.yoon@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <stdio.h>
-#include <string.h>
-#include "svi.h"
-
-char* show_sound_type[] = {
- "SVI_SND_TOUCH_TOUCH1",
- "SVI_SND_TOUCH_TOUCH2",
- "SVI_SND_TOUCH_TOUCH3",
- "SVI_SND_TOUCH_SIP",
- "SVI_SND_TOUCH_HOLD",
- "SVI_SND_TOUCH_MULTI_TAP",
- "SVI_SND_TOUCH_HW_TAP",
- "SVI_SND_TOUCH_HW_HOLD",
- "SVI_SND_TOUCH_KEY00",
- "SVI_SND_TOUCH_KEY01",
- "SVI_SND_TOUCH_KEY02",
- "SVI_SND_TOUCH_KEY03",
- "SVI_SND_TOUCH_KEY04",
- "SVI_SND_TOUCH_KEY05",
- "SVI_SND_TOUCH_KEY06",
- "SVI_SND_TOUCH_KEY07",
- "SVI_SND_TOUCH_KEY08",
- "SVI_SND_TOUCH_KEY09",
- "SVI_SND_TOUCH_KEY_STAR",
- "SVI_SND_TOUCH_KEY_SHARP",
- "SVI_SND_OPERATION_POWERON",
- "SVI_SND_OPERATION_POWEROFF",
- "SVI_SND_OPERATION_CHARGERCONN",
- "SVI_SND_OPERATION_FULLCHARGED",
- "SVI_SND_OPERATION_LOWBATT",
- "SVI_SND_OPERATION_LOCK",
- "SVI_SND_OPERATION_UNLOCK",
- "SVI_SND_OPERATION_CALLCONN",
- "SVI_SND_OPERATION_CALLDISCONN",
- "SVI_SND_OPERATION_MINUTE_MINDER",
- "SVI_SND_OPERATION_VIBRATION",
- "SVI_SND_OPERATION_NEWCHAT",
- "SVI_SND_OPERATION_SENTCHAT",
- "SVI_SND_OPERATION_ONOFFSLIDER",
- "SVI_SND_OPERATION_SCRCAPTURE",
-
-};
-
-char* show_vibration_type[] = {
- "SVI_VIB_TOUCH_TOUCH",
- "SVI_VIB_TOUCH_SIP",
- "SVI_VIB_TOUCH_HOLD",
- "SVI_VIB_TOUCH_MULTI_TAP",
- "SVI_VIB_TOUCH_HW_TAP",
- "SVI_VIB_TOUCH_HW_HOLD",
- "SVI_VIB_TOUCH_KEY00",
- "SVI_VIB_TOUCH_KEY01",
- "SVI_VIB_TOUCH_KEY02",
- "SVI_VIB_TOUCH_KEY03",
- "SVI_VIB_TOUCH_KEY04",
- "SVI_VIB_TOUCH_KEY05",
- "SVI_VIB_TOUCH_KEY06",
- "SVI_VIB_TOUCH_KEY07",
- "SVI_VIB_TOUCH_KEY08",
- "SVI_VIB_TOUCH_KEY09",
- "SVI_VIB_TOUCH_KEY_STAR",
- "SVI_VIB_TOUCH_KEY_SHARP",
- "SVI_VIB_NOTIFICATION_INCOMING_CALL01",
- "SVI_VIB_NOTIFICATION_INCOMING_CALL02",
- "SVI_VIB_NOTIFICATION_INCOMING_CALL03",
- "SVI_VIB_NOTIFICATION_MESSAGE",
- "SVI_VIB_NOTIFICATION_EMAIL",
- "SVI_VIB_NOTIFICATION_WAKEUP",
- "SVI_VIB_NOTIFICATION_SCHEDULE",
- "SVI_VIB_NOTIFICATION_TIMER",
- "SVI_VIB_NOTIFICATION_GENERAL",
- "SVI_VIB_OPERATION_POWER_ON",
- "SVI_VIB_OPERATION_POWER_OFF",
- "SVI_VIB_OPERATION_CHARGERCONN",
- "SVI_VIB_OPERATION_FULLYCHARGED",
- "SVI_VIB_OPERATION_LOTBATT",
- "SVI_VIB_OPERATION_LOCK",
- "SVI_VIB_OPERATION_UNLOCK",
- "SVI_VIB_OPERATION_CALLCONNECT",
- "SVI_VIB_OPERATION_DISCALLCONNECT",
- "SVI_VIB_OPERATION_MINUTEMINDER",
- "SVI_VIB_OPERATION_VIBRATION",
- "SVI_VIB_OPERATION_NEWCHAT",
- "SVI_VIB_OPERATION_SENDCHAT",
- "SVI_VIB_OPERATION_ONOFFSLIDER",
- "SVI_VIB_OPERATION_SHUTTER",
-
-};
-
-int main(int argc, char* argv[]) {
- int r = 0;
- int i = 0;
- int handle = 0;
- int input_type = 0, input = 0;
- char buf[256] = {0,};
-
- r = svi_init(&handle);
-
- printf("Select number of vibration(1), sound(2), svi_get_path(3) for testing\n");
- scanf("%d", &input_type);
-
- if (input_type == 1) {
- do {
- printf("SVI vibration ENUM list :\n");
- for(i = 0; i <= SVI_VIB_OPERATION_SHUTTER; i++) {
- printf("\t %s(%d)\n", show_vibration_type[i], i);
- }
-
- printf("input number: ");
- scanf("%d",&input);
-
- if( input < SVI_VIB_TOUCH_TOUCH || input > SVI_VIB_OPERATION_SHUTTER)
- break;
- printf("%s\n", show_vibration_type[input]);
- r = svi_play_vib(handle, input);
-
- } while(1);
-
- }
- else if (input_type == 2) {
-
-
- do {
- printf("SVI sound enum list :\n");
- for(i = 0; i <= SVI_SND_OPERATION_SCRCAPTURE; i++) {
- printf("\t %s(%d)\n", show_sound_type[i], i);
- }
-
- printf("input number: ");
- scanf("%d",&input);
-
- if( input < SVI_SND_TOUCH_TOUCH1 || input > SVI_SND_OPERATION_SCRCAPTURE)
- break;
- r = svi_play_sound(handle, input);
-
- } while(1);
- } else if (input_type == 3) {
- do {
- int input_type = -1;
- int input_enum = -1;
-
- memset(buf, 0x0, sizeof(buf));
- printf("input <SVI_TYPE_SND/SVI_TYPE_VIB> <enum> :\n");
- scanf("%d %d",&input_type, &input_enum);
-
- if( !(input_type == SVI_TYPE_SND || input_type == SVI_TYPE_VIB)) {
- printf("wrong input_type!!!\n");
- break;
- }
-
- if(input_type == SVI_TYPE_SND) {
- if( input_enum < SVI_SND_TOUCH_TOUCH1 || input_enum > SVI_SND_OPERATION_SCRCAPTURE) {
- printf("wrong input_enum!!!\n");
- break;
- }
- } else if(input_type == SVI_TYPE_VIB) {
- if( input_enum < SVI_VIB_TOUCH_TOUCH || input_enum > SVI_VIB_OPERATION_SHUTTER) {
- printf("wrong input_enum!!!\n");
- break;
- }
- }
- r = svi_get_path(input_type, input_enum, buf, sizeof(buf));
- printf("buf is %s\n", buf);
- } while(1);
- } else {
- printf("wrong number!!!\n");
- r = svi_fini(handle);
- return 0;
- }
-
- printf("end!!\n");
- r = svi_fini(handle);
- return 0;
-}
-