remove vibration
authorJisung Ahn <jcastle.ahn@samsung.com>
Mon, 21 Jan 2013 11:18:16 +0000 (20:18 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Mon, 21 Jan 2013 11:39:16 +0000 (20:39 +0900)
Change-Id: Iafcf9ee4d76c069435cfb447feabe6052af084b4

feature/CMakeLists.txt
feature/include/ivug-vibration.h [deleted file]
feature/src/ivug-vibration.c [deleted file]
main/src/control/ivug-popup.c
main/src/include/ivug-name-view.h
main/src/include/ivug-slider-item.h
main/src/view/ivug-name-view.c
packaging/ug-image-viewer-efl.spec

index 99addc7..92b6dc0 100755 (executable)
@@ -5,7 +5,6 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(VERSION 0.1.0)
 
 SET(SRCS
-       src/ivug-vibration.c
        src/ivug-ext-ug.c
 )
 
@@ -23,7 +22,6 @@ pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
        elementary
        dlog
        ui-gadget-1                                                             # Motion
-       haptic
        capi-system-sensor
 )
 
diff --git a/feature/include/ivug-vibration.h b/feature/include/ivug-vibration.h
deleted file mode 100644 (file)
index dd6a63a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2012  Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __IVUG_VIBRATION_H__
-#define __IVUG_VIBRATION_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdbool.h>
-
-#define INVALID_HAPTIC_HANDLE (NULL)
-#define VIBRATION_DURATION (500)               // 500 ms
-
-typedef void * vibration_h;
-
-/*
-       If success, returns handle. otherwise NULL.
-*/
-vibration_h ivug_vibration_create(void);
-
-/*
-       duration in ms
-*/
-bool ivug_vibration_play(vibration_h handle, int duration);
-
-bool ivug_vibration_stop(vibration_h handle);
-
-bool ivug_vibration_delete(vibration_h handle);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // __IVUG_VIBRATION_H__
-
diff --git a/feature/src/ivug-vibration.c b/feature/src/ivug-vibration.c
deleted file mode 100644 (file)
index 9314f2d..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2012  Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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://floralicense.org/license/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ivug-vibration.h"
-#include "ivug-debug.h"
-
-#include <stdio.h>
-#include <haptic.h>
-
-static const char *_conver_error(int err)
-{
-       switch(err)
-       {
-               case HAPTIC_ERROR_NONE:
-                       return "Successful";
-               case HAPTIC_ERROR_INVALID_PARAMETER:
-                       return "Invalid parameter";
-               case HAPTIC_ERROR_NOT_INITIALIZED:
-                       return "Not initialized";
-               case HAPTIC_ERROR_OPERATION_FAILED:
-                       return "Operation failed";
-               case HAPTIC_ERROR_NOT_SUPPORTED_DEVICE:
-                       return "Not supported device";
-               default:
-               {
-                       static char error[128];
-                       sprintf(error, "Unknow Error : %d(0x%08x)", err, err);
-                       return error;
-               }
-       }
-
-       return NULL;
-
-}
-
-
-vibration_h ivug_vibration_create()
-{
-       int ret = HAPTIC_ERROR_NONE;
-       haptic_device_h handle = NULL;
-
-       ret = haptic_open(HAPTIC_DEVICE_ALL, &handle);
-
-       if (ret != HAPTIC_ERROR_NONE)
-       {
-               MSG_UTIL_ERROR("device_haptic_open failed. %s", _conver_error(ret));
-               return NULL;
-       }
-
-       MSG_UTIL_HIGH("Vibration init. Handle=%x", handle);
-
-       return (vibration_h)handle;
-}
-
-bool ivug_vibration_play(vibration_h v_handle, int duration)
-{
-       IV_ASSERT(v_handle!=NULL);
-       int ret = HAPTIC_ERROR_NONE;
-       haptic_device_h handle = (haptic_device_h)v_handle;
-
-       MSG_UTIL_HIGH("Vibration start. Handle=%x duration=%d", handle, duration);
-
-       ret = haptic_vibrate_monotone(handle, duration, NULL);
-
-       if (ret != HAPTIC_ERROR_NONE)
-       {
-               MSG_UTIL_ERROR("haptic_vibrate_monotone error Handle=%x. %s", handle, _conver_error(ret));
-               return false;
-       }
-
-       return true;
-}
-
-bool ivug_vibration_stop(vibration_h v_handle)
-{
-       IV_ASSERT(v_handle!=NULL);
-       int ret = HAPTIC_ERROR_NONE;
-       haptic_device_h handle = (haptic_device_h)v_handle;
-
-       MSG_UTIL_HIGH("Vibration stop. Handle=%x", handle);
-
-       ret = haptic_stop_all_effects(handle);
-       if (ret != 0)
-       {
-               MSG_UTIL_ERROR("haptic_stop_device failed. %s",  _conver_error(ret));
-       }
-
-       return true;
-}
-
-
-bool ivug_vibration_delete(vibration_h v_handle)
-{
-       IV_ASSERT(v_handle!=NULL);
-       int ret = HAPTIC_ERROR_NONE;
-       haptic_device_h handle = (haptic_device_h)v_handle;
-
-       MSG_UTIL_HIGH("Vibration deinit. Handle=%x", handle);
-
-       ret = haptic_close(handle);
-
-       if (ret != HAPTIC_ERROR_NONE)
-       {
-               MSG_UTIL_ERROR("device_haptic_close failed. %s", _conver_error(ret));
-       }
-
-       return true;
-}
-
-
index 2bae0d8..b5c1976 100755 (executable)
@@ -15,7 +15,6 @@
  */
 
 #include "ivug-popup.h"
-#include "ivug-vibration.h"
 
 #define NOTIFY_TIMEOUT 3.0
 
@@ -33,8 +32,6 @@ typedef struct _Ivug_Popup
 
        Popup_Response response;
 
-       vibration_h haptic_handle;
-
        Evas_Smart_Cb callback;
        void *data;
 
@@ -53,20 +50,11 @@ static Ivug_Popup * ivug_popup_create()
 {
        Ivug_Popup *iv_popup = calloc(1, sizeof(Ivug_Popup));
 
-       iv_popup->haptic_handle = INVALID_HAPTIC_HANDLE;
-
        return iv_popup;
 }
 
 static void ivug_popup_delete(Ivug_Popup *iv_popup)
 {
-       if ( iv_popup->haptic_handle != INVALID_HAPTIC_HANDLE )
-       {
-               ivug_vibration_stop(iv_popup->haptic_handle);
-               ivug_vibration_delete(iv_popup->haptic_handle);
-
-               iv_popup->haptic_handle = INVALID_HAPTIC_HANDLE;
-       }
 
        if(iv_popup->popup)
        {
@@ -352,22 +340,7 @@ _ivug_rename_maxlength_reached(void *data, Evas_Object *obj, void *event_info)
        Ivug_Popup *iv_popup = (Ivug_Popup *)data;
        IV_ASSERT(iv_popup != NULL);
 
-       if ( iv_popup->haptic_handle == INVALID_HAPTIC_HANDLE )
-       {
-               iv_popup->haptic_handle = ivug_vibration_create();
-               if ( iv_popup->haptic_handle == INVALID_HAPTIC_HANDLE )
-               {
-                       MSG_IMAGEVIEW_ERROR( "ivug_vibration_create failed");
-                       return;
-               }
-       }
-       else
-       {
-               ivug_vibration_stop(iv_popup->haptic_handle);
-       }
-
-       ivug_vibration_play(iv_popup->haptic_handle ,VIBRATION_DURATION);
-
+       //todo : show popup
 }
 
 Evas_Object *ivug_rename_popup_show(Evas_Object *parent, const char *filename, Evas_Smart_Cb response, void *data)
index 9e82a22..39bb483 100755 (executable)
@@ -19,7 +19,6 @@
 
 #include "ivug-common.h"
 #include "ivug-media.h"
-#include "ivug-vibration.h"
 
 typedef enum {
        NAME_VIEW_RESPONSE_OK,
@@ -40,8 +39,6 @@ typedef struct _Ivug_NameView
        Evas_Object *entry;
        Evas_Object *btn_done;
 
-       vibration_h haptic_handle;              // Null if invalid
-
        FNResponse fnresponse;
        void *clientdata;
 
index 351408c..d922f0b 100755 (executable)
@@ -164,10 +164,6 @@ ivug_slider_item_hide_menu(Slide_Item* si);
 void
 ivug_slider_item_show_menu(Slide_Item* si);
 
-Eina_Bool
-ivug_slider_item_video_is_playing(Slide_Item* si);
-
-
 Evas_Object *
 ivug_slider_item_image_get(Slide_Item* si);
 
index 1996a7a..8312dd7 100755 (executable)
@@ -21,7 +21,6 @@
 #include "ivug-popup.h"
 
 #include "ivug-media.h"
-#include "ivug-vibration.h"
 
 #include "ivug-util.h"
 
@@ -99,21 +98,7 @@ _ivug_name_view_maxlength_reached(void *data, Evas_Object *obj, void *event_info
        Ivug_NameView *pNameView = (Ivug_NameView *)data;
        IV_ASSERT(pNameView != NULL);
 
-       if ( pNameView->haptic_handle == INVALID_HAPTIC_HANDLE )
-       {
-               pNameView->haptic_handle = ivug_vibration_create();
-               if ( pNameView->haptic_handle == INVALID_HAPTIC_HANDLE )
-               {
-                       MSG_IMAGEVIEW_ERROR( "ivug_vibration_create failed");
-                       return;
-               }
-       }
-       else
-       {
-               ivug_vibration_stop(pNameView->haptic_handle);
-       }
-
-       ivug_vibration_play(pNameView->haptic_handle ,VIBRATION_DURATION);
+       //todo : show popup
 
 }
 
@@ -325,8 +310,6 @@ ivug_name_view_create(Evas_Object *parent, const char *title)
                return NULL;
        }
 
-       pNameView->haptic_handle = INVALID_HAPTIC_HANDLE;               // Invalid
-
        MSG_IMAGEVIEW_HIGH( "Add Name View creation");
 
        pNameView->layout = ivug_default_layout_add(parent);
@@ -407,15 +390,6 @@ ivug_name_view_destroy(Ivug_NameView *pNameView)
 
        MSG_IMAGEVIEW_HIGH( "Destroy Name View");
 
-       if ( pNameView->haptic_handle != INVALID_HAPTIC_HANDLE )
-       {
-               ivug_vibration_stop(pNameView->haptic_handle);
-               ivug_vibration_delete(pNameView->haptic_handle);
-
-               pNameView->haptic_handle = INVALID_HAPTIC_HANDLE;
-       }
-
-
        if(pNameView->layout)
        {
                evas_object_del(pNameView->layout);
index 89cfc2b..4d84ce5 100755 (executable)
@@ -41,7 +41,6 @@ BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(capi-appfw-app-manager)
 BuildRequires: pkgconfig(capi-system-runtime-info)
 BuildRequires: pkgconfig(capi-system-sensor)
-BuildRequires: pkgconfig(haptic)
 BuildRequires: pkgconfig(capi-media-metadata-extractor)
 BuildRequires: pkgconfig(capi-content-mime-type)
 BuildRequires: pkgconfig(capi-content-media-content)