remove unused feature
authorByeongin Oh <quddls.oh@samsung.com>
Thu, 28 Mar 2013 08:03:52 +0000 (17:03 +0900)
committerByeongin Oh <quddls.oh@samsung.com>
Thu, 28 Mar 2013 08:03:52 +0000 (17:03 +0900)
Change-Id: If3a00cdb1a4871cbcd68d985bbec725166d4159b

packaging/org.tizen.music-player.spec
src/common/include/mp-app.h [changed mode: 0644->0755]
src/common/mp-app.c
src/common/mp-play.c [changed mode: 0644->0755]
src/core/include/mp-setting-ctrl.h [changed mode: 0644->0755]
src/core/mp-player-control.c
src/core/mp-setting-ctrl.c
src/include/mp-define.h [changed mode: 0644->0755]
src/include/music.h
src/mp-main.c

index fc1d905..b0ae7eb 100644 (file)
@@ -126,7 +126,7 @@ chown -R 5000:5000 %{SP_DATA_PREFIX}/data
 /usr/bin/vconftool set -t int db/private/org.tizen.music-player/playlist 7 -g 5000
 
 /usr/bin/vconftool set -t int memory/private/org.tizen.music-player/playing_pid 0 -i -g 5000
-
+/usr/bin/vconftool set -t int db/setting/music-player/menu 7 -g 5000
 
 
 %files
old mode 100644 (file)
new mode 100755 (executable)
index 81a11a4..c314f1a
@@ -55,12 +55,4 @@ void mp_app_ungrab_mm_keys(struct appdata *ad);
 void mp_app_live_box_init(struct appdata *ad);
 void mp_app_live_box_deinit(struct appdata *ad);
 
-#ifdef MP_FEATURE_AUTO_OFF
-Eina_Bool mp_app_auto_off_timer_expired_cb(void *data);
-void mp_app_auto_off_changed_cb(int min, void *data);
-#endif
-#ifdef MP_FEATURE_PLAY_SPEED
-void mp_app_play_speed_changed_cb(double speed, void *data);
-#endif
-
 #endif // __MP_APP_H__
index 15a640b..183b024 100755 (executable)
@@ -1121,53 +1121,3 @@ mp_app_ungrab_mm_keys(struct appdata *ad)
        utilx_ungrab_key(ecore_x_display_get(), ad->xwin, KEY_MEDIA);
 }
 
-
-#ifdef MP_FEATURE_AUTO_OFF
-Eina_Bool
-mp_app_auto_off_timer_expired_cb(void *data)
-{
-       struct appdata *ad = data;
-       MP_CHECK_VAL(ad, ECORE_CALLBACK_CANCEL);
-
-       mp_debug("#### auto off ####");
-
-       ad->auto_off_timer = NULL;
-       mp_setting_reset_auto_off_time();
-
-       mp_app_exit(ad);
-
-       return ECORE_CALLBACK_DONE;
-}
-
-void
-mp_app_auto_off_changed_cb(int min, void *data)
-{
-       struct appdata *ad = data;
-       MP_CHECK(ad);
-
-       mp_ecore_timer_del(ad->auto_off_timer);
-       mp_debug("auto off time set [%d]", min);
-
-       if (min <= 0) {
-               mp_debug("disable auto off");
-               return;
-       }
-
-       double timeout = min * 60;
-       ad->auto_off_timer = ecore_timer_add(timeout, mp_app_auto_off_timer_expired_cb, ad);
-}
-#endif
-
-#ifdef MP_FEATURE_PLAY_SPEED
-void
-mp_app_play_speed_changed_cb(double speed, void *data)
-{
-       struct appdata *ad = data;
-       MP_CHECK(ad);
-
-       DEBUG_TRACE("playspeed: %f", speed);
-       mp_player_mgr_set_play_speed(speed);
-}
-#endif
-
-
old mode 100644 (file)
new mode 100755 (executable)
index 6e7cd22..7631115
@@ -281,15 +281,6 @@ mp_play_next_file(void *data, bool forced)
 #endif
                {
                        DEBUG_TRACE("End of playlist");
-#ifdef MP_FEATURE_AUTO_OFF
-                       if (mp_playlist_mgr_get_repeat(ad->playlist_mgr)== MP_PLST_REPEAT_NONE
-                               && ad->auto_off_timer)
-                       {
-                               mp_ecore_timer_del(ad->auto_off_timer);
-                               mp_setting_reset_auto_off_time();
-                               mp_app_exit(ad);
-                       }
-#endif
                }
        }
 
@@ -348,21 +339,6 @@ mp_play_start(void *data)
        endfunc;
 }
 
-#ifdef MP_FEATURE_AUTO_OFF
-static Eina_Bool
-_mp_play_control_paused_off_timer_cb(void *data)
-{
-       struct appdata *ad = data;
-       MP_CHECK_VAL(ad, ECORE_CALLBACK_CANCEL);
-       ad->pause_off_timer = NULL;
-
-       if (ad->auto_off_timer && ad->player_state == PLAY_STATE_PAUSED)
-               mp_app_auto_off_timer_expired_cb(ad);
-
-       return ECORE_CALLBACK_DONE;
-}
-#endif
-
 void
 mp_play_pause(void *data)
 {
@@ -397,15 +373,6 @@ mp_play_pause(void *data)
        ad->player_state = PLAY_STATE_PAUSED;
        ad->paused_by_other_player = FALSE;
 
-#ifdef MP_FEATURE_AUTO_OFF
-       mp_ecore_timer_del(ad->pause_off_timer);
-       if (ad->auto_off_timer)
-       {
-               mp_debug("auto off set");
-               ad->pause_off_timer = ecore_timer_add(PAUSE_OFF_TIMEOUT, _mp_play_control_paused_off_timer_cb, ad);
-       }
-#endif
-
 #ifdef MP_FEATURE_AVRCP_13
        mp_avrcp_noti_player_state(MP_AVRCP_STATE_PAUSED);
 #endif
old mode 100644 (file)
new mode 100755 (executable)
index 04451da..65dbf8e
@@ -43,18 +43,6 @@ void mp_setting_save_now_playing(void *ad);
 void mp_setting_save_shortcut(char *shortcut_title, char *artist, char *shortcut_description,
                              char *shortcut_image_path);
 
-#ifdef MP_FEATURE_AUTO_OFF
-int mp_setting_auto_off_set_callback(MpSettingAutoOff_Cb func, void *data);
-void mp_setting_reset_auto_off_time();
-int mp_setting_get_auto_off_time();
-#endif
-
-#ifdef MP_FEATURE_PLAY_SPEED
-int mp_setting_set_play_speed_change_callback(MpSettingPlaySpeed_Cb func, void *data);
-int mp_setting_reset_play_speed();
-double mp_setting_get_play_speed();
-#endif
-
 void mp_setting_update_active_device();
 
 #endif // __MP_SETTING_CTRL_H_
index 2fa7f07..517e445 100755 (executable)
@@ -301,10 +301,6 @@ _mp_play_control_prepare_cb(void *userdata)
        struct appdata *ad = userdata;
        MP_CHECK(ad);
 
-#ifdef MP_FEATURE_PLAY_SPEED
-       mp_player_mgr_set_play_speed(mp_setting_get_play_speed());
-#endif
-
        mp_play_current_file(ad);
 }
 
@@ -424,10 +420,6 @@ mp_play_control_play_pause(struct appdata *ad, bool play)
                        //silentmode -> go to listview -> click one track -> silent mode play no -> go to playing view -> click play icon
                        mp_play_new_file(ad, TRUE);
                }
-
-#ifdef MP_FEATURE_AUTO_OFF
-               mp_ecore_timer_del(ad->pause_off_timer);
-#endif
        }
        else
        {
index 5e104d2..55cfc97 100755 (executable)
@@ -54,15 +54,6 @@ typedef struct _mp_setting_t
        MpSettingPlaylist_Cb playlist_cb;
        void *playlist_udata;
 
-
-#ifdef MP_FEATURE_AUTO_OFF
-       MpSettingAutoOff_Cb auto_off_cb;
-       void *auto_off_udata;
-#endif
-#ifdef MP_FEATURE_PLAY_SPEED
-       MpSettingPlaySpeed_Cb play_speed_cb;
-       void *play_speed_udata;
-#endif
 } mp_setting_t;
 
 static mp_setting_t *g_setting = NULL;
@@ -102,57 +93,6 @@ _mp_setting_playlist_changed_cb(keynode_t * node, void *user_data)
        return;
 }
 
-
-#ifdef MP_FEATURE_AUTO_OFF
-static void
-_mp_setting_auto_off_changed_cb(keynode_t * node, void *user_data)
-{
-       mp_setting_t *sd = NULL;
-
-       mp_retm_if(node == NULL, "keymode is NULL");
-       mp_retm_if(user_data == NULL, "user_date is NULL");
-       sd = (mp_setting_t *) user_data;
-
-       int min = 0;
-       if (vconf_get_int(VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL, &min))
-       {
-               ERROR_TRACE("Fail to get %s", VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL);
-               return;
-       }
-
-       mp_debug("auto off time changed [%d] miniute", min);
-       if (sd->auto_off_cb)
-               sd->auto_off_cb(min, sd->auto_off_udata);
-
-       return;
-}
-#endif
-
-#ifdef MP_FEATURE_PLAY_SPEED
-static void
-_mp_setting_play_speed_changed_cb(keynode_t * node, void *user_data)
-{
-       mp_setting_t *sd = NULL;
-
-       mp_retm_if(node == NULL, "keymode is NULL");
-       mp_retm_if(user_data == NULL, "user_date is NULL");
-       sd = (mp_setting_t *) user_data;
-
-       double speed = 0;
-       if (vconf_get_dbl(VCONFKEY_MUSIC_PLAY_SPEED, &speed))
-       {
-               ERROR_TRACE("Fail to get %s", VCONFKEY_MUSIC_PLAY_SPEED);
-               return;
-       }
-
-       mp_debug("play speed changed [%d]", speed);
-       if (sd->play_speed_cb)
-               sd->play_speed_cb(speed, sd->play_speed_udata);
-
-       return;
-}
-#endif
-
 static int
 mp_setting_key_cb_init(void)
 {
@@ -167,22 +107,6 @@ mp_setting_key_cb_init(void)
                ret = -1;
        }
 
-#ifdef MP_FEATURE_AUTO_OFF
-       if (vconf_notify_key_changed(VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL, _mp_setting_auto_off_changed_cb, g_setting) < 0)
-       {
-               ERROR_TRACE("Fail to register VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL key callback");
-               ret = -1;
-       }
-#endif
-
-#ifdef MP_FEATURE_PLAY_SPEED
-       if (vconf_notify_key_changed(VCONFKEY_MUSIC_PLAY_SPEED, _mp_setting_play_speed_changed_cb, g_setting) < 0)
-       {
-               ERROR_TRACE("Fail to register VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL key callback");
-               ret = -1;
-       }
-#endif
-
        return ret;
 }
 
@@ -190,13 +114,6 @@ static void
 mp_setting_key_cb_deinit(void)
 {
        vconf_ignore_key_changed(MP_VCONFKEY_PLAYLIST_VAL_INT, _mp_setting_playlist_changed_cb);
-#ifdef MP_FEATURE_AUTO_OFF
-       vconf_ignore_key_changed(VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL, _mp_setting_auto_off_changed_cb);
-#endif
-
-#ifdef MP_FEATURE_PLAY_SPEED
-       vconf_ignore_key_changed(VCONFKEY_MUSIC_PLAY_SPEED, _mp_setting_play_speed_changed_cb);
-#endif
        return;
 }
 
@@ -238,11 +155,6 @@ mp_setting_init(struct appdata *ad)
        mp_setting_get_shuffle_state(&shuffle);
        mp_playlist_mgr_set_shuffle(ad->playlist_mgr, shuffle);
 
-#ifdef MP_FEATURE_AUTO_OFF
-       /* reset auto off in music player only */
-       mp_setting_reset_auto_off_time();
-#endif
-
        return ret;
 }
 
@@ -432,81 +344,6 @@ mp_setting_save_shortcut(char *shortcut_title, char *artist, char *shortcut_desc
 
 #endif
 
-#ifdef MP_FEATURE_AUTO_OFF
-int
-mp_setting_auto_off_set_callback(MpSettingAutoOff_Cb func, void *data)
-{
-       mp_retvm_if(g_setting == NULL, -1, "setting data is not initialized, init first!!!!!");
-
-       g_setting->auto_off_cb = func;
-       g_setting->auto_off_udata = data;
-
-       return 0;
-}
-
-void
-mp_setting_reset_auto_off_time()
-{
-       int ret = vconf_set_int(VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL, 0);
-       if (ret) {
-               mp_error("vconf_set_int().. err[%d]", ret);
-       }
-       ret = vconf_set_int(VCONFKEY_MUSIC_AUTO_OFF_TYPE_VAL, 0);
-       if (ret) {
-               mp_error("vconf_set_int().. err[%d]", ret);
-       }
-}
-
-int
-mp_setting_get_auto_off_time()
-{
-       int min = 0;
-
-       if (vconf_get_int(VCONFKEY_MUSIC_AUTO_OFF_TIME_VAL, &min)){
-               mp_error("vconf_get_int()");
-               min = 0;
-       }
-
-       return min;
-}
-#endif
-
-#ifdef MP_FEATURE_PLAY_SPEED
-int mp_setting_set_play_speed_change_callback(MpSettingPlaySpeed_Cb func, void *data)
-{
-       mp_retvm_if(g_setting == NULL, -1, "setting data is not initialized, init first!!!!!");
-
-       g_setting->play_speed_cb= func;
-       g_setting->play_speed_udata= data;
-
-       return 0;
-}
-int mp_setting_reset_play_speed(void)
-{
-       int ret = vconf_set_dbl(VCONFKEY_MUSIC_PLAY_SPEED, 1.0);
-       if (ret) {
-               mp_error("vconf_set_int().. err[%d]", ret);
-       }
-
-       return ret;
-}
-
-double mp_setting_get_play_speed(void)
-{
-       double speed = 1.0;
-       if (vconf_get_dbl(VCONFKEY_MUSIC_PLAY_SPEED, &speed)){
-               mp_error("vconf_get_int()");
-       }
-       if(speed > 2.0 || speed < 0.5)
-       {
-               ERROR_TRACE("inavlid speed: %f", speed);
-               speed = 1.0;
-       }
-       return speed;
-}
-
-#endif
-
 void
 mp_setting_update_active_device()
 {
old mode 100644 (file)
new mode 100755 (executable)
index be05239..79b85df
 #define MP_FEATURE_MOTION
 #define MP_FEATURE_NFC_SHARE
 #define MP_FEATURE_SVOICE
-#define MP_FEATURE_PLAY_SPEED
 #ifndef MP_SOUND_PLAYER        /* music player only*/
 #define MP_FEATURE_ASF_ALLSHARE
 #define MP_FEATURE_LIVE_BOX
 #define MP_FEATURE_SPLIT_VIEW
-#define MP_FEATURE_AUTO_OFF
 #define MP_FEATURE_CONTEXT_ENGINE
 #endif
 #ifdef MP_SOUND_PLAYER
index 40ca43d..5e240db 100755 (executable)
@@ -434,15 +434,6 @@ struct appdata
 
        mp_track_info_t *current_track_info;
 
-
-
-
-#ifdef MP_FEATURE_AUTO_OFF
-       Ecore_Timer *auto_off_timer;
-       Ecore_Timer *pause_off_timer;
-#endif
-
-
        Evas_Object *more_btn_popup;
        mp_more_button_type_e more_btn_type;
 
index 38642a1..f5bc9cf 100755 (executable)
@@ -433,16 +433,6 @@ _mp_main_app_init_idler_cb(void *data)
 
        ad->app_init_idler = NULL;
 
-
-#ifdef MP_FEATURE_AUTO_OFF
-       mp_setting_auto_off_set_callback(mp_app_auto_off_changed_cb, ad);
-#endif
-
-#ifdef MP_FEATURE_PLAY_SPEED
-       mp_setting_reset_play_speed();
-       mp_setting_set_play_speed_change_callback(mp_app_play_speed_changed_cb, ad);
-#endif
-
        power_set_changed_cb(__mp_main_lcd_state_changed_cb, ad);
 
 
@@ -740,10 +730,6 @@ mp_terminate(void *data)
        mp_ecore_idler_del(ad->app_init_idler);
        mp_ecore_idler_del(ad->popup_del_idler);
        mp_ecore_timer_del(ad->longpress_timer);
-#ifdef MP_FEATURE_AUTO_OFF
-       mp_ecore_timer_del(ad->auto_off_timer);
-       mp_ecore_timer_del(ad->pause_off_timer);
-#endif
 
        mp_app_ungrab_mm_keys(ad);