feedback: change libsvi to libfeedback for vibration 51/41451/1 accepted/tizen/mobile/20150617.011833 accepted/tizen/tv/20150617.011902 accepted/tizen/wearable/20150617.011912 submit/tizen/20150616.011120
authortaeyoung <ty317.kim@samsung.com>
Mon, 15 Jun 2015 11:27:31 +0000 (20:27 +0900)
committertaeyoung <ty317.kim@samsung.com>
Mon, 15 Jun 2015 11:32:32 +0000 (20:32 +0900)
- libsvi is deprecated. Thus libfeedback should be used
  for vibration.
- libfeedback is used for vibration, sound, and led control

Change-Id: Ia76c1b84b200858ea9ade889fc7ed35c9d1c4ab6
Signed-off-by: taeyoung <ty317.kim@samsung.com>
client/CMakeLists.txt
client/net_nfc_client_util.c
daemon/CMakeLists.txt
daemon/net_nfc_server_util.c
packaging/nfc-manager-neard.spec
src/manager/CMakeLists.txt

index 57c5960..518d1e5 100644 (file)
@@ -16,7 +16,7 @@ IF(WAYLAND_SUPPORT)
 ENDIF(WAYLAND_SUPPORT)
 INCLUDE(FindPkgConfig)
 pkg_check_modules(client_pkgs REQUIRED dlog vconf libtzplatform-config neardal
-                       libssl appsvc svi capi-media-wav-player ${WIN_PKG})
+                       libssl appsvc feedback capi-media-wav-player ${WIN_PKG})
 
 IF(WAYLAND_SUPPORT)
        ADD_DEFINITIONS("-DHAVE_WAYLAND")
index d3a3465..33b2132 100755 (executable)
@@ -31,7 +31,7 @@
 #include <openssl/buffer.h>
 
 #include <vconf.h>
-#include <svi.h>
+#include <feedback.h>
 #include <wav_player.h>
 #include <appsvc.h>
 #include <aul.h>
@@ -984,6 +984,7 @@ void net_nfc_manager_util_play_sound(net_nfc_sound_type_e sound_type)
 {
        int bSoundOn = 0;
        int bVibrationOn = 0;
+       int ret;
 
        if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &bSoundOn) != 0)
        {
@@ -1005,16 +1006,19 @@ void net_nfc_manager_util_play_sound(net_nfc_sound_type_e sound_type)
 
        if (bVibrationOn)
        {
-               int svi_handle = -1;
-
                NFC_DBG("Play Vibration");
 
-               if (SVI_SUCCESS == svi_init(&svi_handle))
+               ret = feedback_initialize();
+               if (ret == FEEDBACK_ERROR_NONE)
                {
-                       if (SVI_SUCCESS == svi_play_vib(svi_handle, SVI_VIB_TOUCH_SIP))
-                               NFC_DBG("svi_play_vib success");
-
-                       svi_fini(svi_handle);
+                       ret = feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_SIP);
+                       if (ret != FEEDBACK_ERROR_NONE)
+                               NFC_ERR("Failed to play vibration(%d)", ret);
+                       feedback_deinitialize();
+               }
+               else
+               {
+                       NFC_ERR("Failed to init vibration(%d)", ret);
                }
        }
 
index d99d0e2..82459c0 100755 (executable)
@@ -17,12 +17,12 @@ ENDIF(WAYLAND_SUPPORT)
 INCLUDE(FindPkgConfig)
 IF(ARM_TARGET)
        pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0
-               vconf dlog tapi appsvc libcurl libssl svi capi-media-wav-player
+               vconf dlog tapi appsvc libcurl libssl feedback capi-media-wav-player
                pkgmgr pkgmgr-info capi-network-wifi pmapi wifi-direct
                libtzplatform-config neardal ${WIN_PKG})
 ELSE(ARM_TARGET)
        pkg_check_modules(daemon_pkgs REQUIRED aul glib-2.0 gio-unix-2.0
-               vconf dlog tapi appsvc libcurl libssl svi capi-media-wav-player
+               vconf dlog tapi appsvc libcurl libssl feedback capi-media-wav-player
                pkgmgr pkgmgr-info capi-network-wifi pmapi libtzplatform-config neardal
                ${WIN_PKG})
 ENDIF(ARM_TARGET)
index 1fd5560..70d92b7 100755 (executable)
@@ -32,7 +32,7 @@
 #include <openssl/buffer.h>
 
 #include <vconf.h>
-#include <svi.h>
+#include <feedback.h>
 #include <wav_player.h>
 #include <appsvc.h>
 #include <aul.h>
@@ -992,6 +992,7 @@ void net_nfc_manager_util_play_sound(net_nfc_sound_type_e sound_type)
 {
        int bSoundOn = 0;
        int bVibrationOn = 0;
+       int ret;
 
        if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &bSoundOn) != 0)
        {
@@ -1013,16 +1014,19 @@ void net_nfc_manager_util_play_sound(net_nfc_sound_type_e sound_type)
 
        if (bVibrationOn)
        {
-               int svi_handle = -1;
-
                NFC_DBG("Play Vibration");
 
-               if (SVI_SUCCESS == svi_init(&svi_handle))
+               ret = feedback_initialize();
+               if (ret == FEEDBACK_ERROR_NONE)
                {
-                       if (SVI_SUCCESS == svi_play_vib(svi_handle, SVI_VIB_TOUCH_SIP))
-                               NFC_DBG("svi_play_vib success");
-
-                       svi_fini(svi_handle);
+                       ret = feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_SIP);
+                       if (ret != FEEDBACK_ERROR_NONE)
+                               NFC_ERR("Failed to play vibration(%d)", ret);
+                       feedback_deinitialize();
+               }
+               else
+               {
+                       NFC_ERR("Failed to init vibration(%d)", ret);
                }
        }
 
index e89de93..b27d94d 100755 (executable)
@@ -23,7 +23,7 @@ BuildRequires:  pkgconfig(capi-network-wifi)
 BuildRequires:  pkgconfig(capi-network-bluetooth)
 BuildRequires:  pkgconfig(mm-sound)
 BuildRequires:  pkgconfig(appsvc)
-BuildRequires:  pkgconfig(svi)
+BuildRequires:  pkgconfig(feedback)
 BuildRequires:  pkgconfig(capi-media-wav-player)
 BuildRequires:  pkgconfig(libssl)
 BuildRequires:  pkgconfig(libcurl)
index 78a52bb..b5aa801 100644 (file)
@@ -20,7 +20,7 @@ IF(WAYLAND_SUPPORT)
        SET(WIN_PKG "${WIN_PKG} ecore-wayland")
 ENDIF(WAYLAND_SUPPORT)
 INCLUDE(FindPkgConfig)
-pkg_check_modules(manager_pkges REQUIRED aul glib-2.0 gobject-2.0 dbus-glib-1 vconf dlog tapi appsvc libcurl bluetooth-api heynoti smartcard-service smartcard-service-common libssl pmapi svi capi-media-wav-player pkgmgr pkgmgr-info ${WIN_PKG})
+pkg_check_modules(manager_pkges REQUIRED aul glib-2.0 gobject-2.0 dbus-glib-1 vconf dlog tapi appsvc libcurl bluetooth-api heynoti smartcard-service smartcard-service-common libssl pmapi feedback capi-media-wav-player pkgmgr pkgmgr-info ${WIN_PKG})
 
 IF(WAYLAND_SUPPORT)
  ADD_DEFINITIONS("-DHAVE_WAYLAND")