From 5e469004c7a86c68cb3e12b3bddc5e485a463fb6 Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Fri, 2 Dec 2016 12:03:31 +0530 Subject: [PATCH] [Code Cleanup] Removed Unused Files Change-Id: Ide008156faad2825bfcbfc8c7f454584f59d78c6 Signed-off-by: bhutani.92 --- CMakeLists.txt | 2 - project_def.prop | 2 +- sound-player/CMakeLists.txt | 2 - sound-player/project_def.prop | 2 +- src/common/include/mp-util.h | 1 - src/common/mp-menu.c | 1 - src/common/mp-play.c | 8 +--- src/common/mp-util.c | 17 -------- src/core/include/mp-player-drm.h | 86 ------------------------------------- src/core/include/mp-streaming-mgr.h | 27 ------------ src/core/mp-player-control.c | 5 +-- src/core/mp-player-drm.c | 16 ------- src/core/mp-player-mgr.c | 2 - src/core/mp-playlist-mgr.c | 4 +- src/core/mp-streaming-mgr.c | 72 ------------------------------- src/mp-main.c | 18 +------- src/view/mp-all-view.c | 80 ---------------------------------- src/view/mp-player-view.c | 13 +----- src/widget/mp-now-playing-list.c | 2 +- 19 files changed, 9 insertions(+), 351 deletions(-) delete mode 100644 src/core/include/mp-player-drm.h delete mode 100644 src/core/include/mp-streaming-mgr.h delete mode 100644 src/core/mp-player-drm.c delete mode 100644 src/core/mp-streaming-mgr.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c1fd1f..ecce88c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,9 +55,7 @@ SET(COMMON_SRCS src/core/mp-file-tag-info.c src/core/mp-player-control.c src/core/mp-player-mgr.c - src/core/mp-player-drm.c src/core/mp-setting-ctrl.c - src/core/mp-streaming-mgr.c src/core/mp-lyric-mgr.c src/core/mp-volume.c src/core/mp-http-mgr.c diff --git a/project_def.prop b/project_def.prop index b46759b..1e8bb15 100644 --- a/project_def.prop +++ b/project_def.prop @@ -9,7 +9,7 @@ type = app profile = mobile-3.0 # C Sources -USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/core/mp-http-mgr.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/core/mp-streaming-mgr.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/core/mp-player-drm.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/setting/src/ms-util.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/view/mp-artist-detail-view.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/setting/src/ms-auto-off.c src/setting/src/ms-play-speed.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c +USER_SRCS = src/widget/mp-now-playing.c src/widget/mp-index.c src/core/mp-http-mgr.c src/view/mp-edit-view.c src/view/mp-genre-detail-view.c src/widget/mp-artist-detail-list.c src/setting/src/ms-playlist.c src/widget/mp-track-list.c src/core/mp-file-tag-info.c src/widget/mp-player-volume-widget.c src/widget/mp-notification.c src/view/mp-add-track-view.c src/core/mp-lyric-mgr.c src/common/mp-media-info.c src/widget/mp-genre-list.c src/common/mp-ta.c src/view/mp-create-playlist-view.c src/view/mp-all-view.c src/common/mp-util.c src/common/mp-edit-callback.c src/view/mp-player-view.c src/common/mp-file-util.c src/widget/mp-album-detail-list.c src/widget/mp-ctxpopup.c src/common/mp-menu.c src/core/mp-view-mgr.c src/core/mp-player-mgr.c src/common/mp-app.c src/widget/mp-album-list.c src/widget/mp-artist-list.c src/view/mp-search-view.c src/mp-main.c src/view/mp-album-detail-view.c src/widget/mp-lyric.c src/view/mp-list-view.c src/setting/src/ms-util.c src/view/mp-now-playing-list-view.c src/common/mp-widget.c src/view/mp-artist-detail-view.c src/widget/mp-lockscreenmini.c src/view/mp-playlist-detail-view.c src/view/mp-select-track-view.c src/widget/mp-smart-event-box.c src/common/mp-ug-launch.c src/common/mp-common.c src/widget/mp-search.c src/view/mp-set-as-view.c src/setting/src/ms-key-ctrl.c src/view/mp-setting-view.c src/widget/mp-popup.c src/core/mp-setting-ctrl.c src/core/mp-playlist-mgr.c src/view/mp-detail-view.c src/widget/mp-now-playing-list.c src/core/mp-volume.c src/setting/src/ms-auto-off.c src/setting/src/ms-play-speed.c src/view/mp-view.c src/widget/mp-edit-playlist.c src/widget/mp-list.c src/core/mp-language-mgr.c src/core/mp-player-control.c src/common/mp-item.c src/widget/mp-playlist-list.c src/widget/mp-minicontroller.c src/common/mp-play.c src/widget/mp-search-list.c # EDC Sources USER_EDCS = diff --git a/sound-player/CMakeLists.txt b/sound-player/CMakeLists.txt index 2c39cd4..3a65e8d 100755 --- a/sound-player/CMakeLists.txt +++ b/sound-player/CMakeLists.txt @@ -78,10 +78,8 @@ SET(SRCS ${CMAKE_SOURCE_DIR}/src/core/mp-file-tag-info.c ${CMAKE_SOURCE_DIR}/src/core/mp-player-control.c ${CMAKE_SOURCE_DIR}/src/core/mp-player-mgr.c - ${CMAKE_SOURCE_DIR}/src/core/mp-player-drm.c ${CMAKE_SOURCE_DIR}/src/core/mp-setting-ctrl.c ${CMAKE_SOURCE_DIR}/src/core/mp-playlist-mgr.c - ${CMAKE_SOURCE_DIR}/src/core/mp-streaming-mgr.c ${CMAKE_SOURCE_DIR}/src/core/mp-lyric-mgr.c ${CMAKE_SOURCE_DIR}/src/core/mp-http-mgr.c ${CMAKE_SOURCE_DIR}/src/core/mp-volume.c diff --git a/sound-player/project_def.prop b/sound-player/project_def.prop index 511e041..a7431ab 100644 --- a/sound-player/project_def.prop +++ b/sound-player/project_def.prop @@ -9,7 +9,7 @@ type = app profile = mobile-3.0 # C Sources -USER_SRCS = ../src/common/mp-play.c ../src/core/mp-lyric-mgr.c ../src/common/mp-media-info.c ../src/common/mp-ug-launch.c ../src/common/mp-common.c ../src/widget/mp-popup.c ../src/widget/mp-player-volume-widget.c ../src/widget/mp-notification.c ../src/common/mp-item.c ../src/widget/mp-ctxpopup.c ../src/core/mp-player-control.c ../src/view/mp-view.c ../src/view/mp-player-view.c ../src/core/mp-language-mgr.c ../src/core/mp-volume.c ../src/common/mp-widget.c ../src/core/mp-setting-ctrl.c ../src/widget/mp-lyric.c ../src/view/mp-detail-view.c ../src/widget/mp-minicontroller.c ../src/core/mp-http-mgr.c ../src/core/mp-player-drm.c ../src/core/mp-view-mgr.c ../src/core/mp-player-mgr.c ../src/common/mp-app.c ../src/widget/mp-smart-event-box.c ../src/common/mp-file-util.c ../src/core/mp-file-tag-info.c ../src/common/mp-menu.c ../src/widget/mp-lockscreenmini.c ../src/mp-main.c ../src/common/mp-util.c ../src/core/mp-playlist-mgr.c ../src/core/mp-streaming-mgr.c +USER_SRCS = ../src/common/mp-play.c ../src/core/mp-lyric-mgr.c ../src/common/mp-media-info.c ../src/common/mp-ug-launch.c ../src/common/mp-common.c ../src/widget/mp-popup.c ../src/widget/mp-player-volume-widget.c ../src/widget/mp-notification.c ../src/common/mp-item.c ../src/widget/mp-ctxpopup.c ../src/core/mp-player-control.c ../src/view/mp-view.c ../src/view/mp-player-view.c ../src/core/mp-language-mgr.c ../src/core/mp-volume.c ../src/common/mp-widget.c ../src/core/mp-setting-ctrl.c ../src/widget/mp-lyric.c ../src/view/mp-detail-view.c ../src/widget/mp-minicontroller.c ../src/core/mp-http-mgr.c ../src/core/mp-view-mgr.c ../src/core/mp-player-mgr.c ../src/common/mp-app.c ../src/widget/mp-smart-event-box.c ../src/common/mp-file-util.c ../src/core/mp-file-tag-info.c ../src/common/mp-menu.c ../src/widget/mp-lockscreenmini.c ../src/mp-main.c ../src/common/mp-util.c ../src/core/mp-playlist-mgr.c # EDC Sources USER_EDCS = diff --git a/src/common/include/mp-util.h b/src/common/include/mp-util.h index 791775d..d95f0b2 100644 --- a/src/common/include/mp-util.h +++ b/src/common/include/mp-util.h @@ -57,7 +57,6 @@ enum { void mp_to_lower(char *str); int mp_setting_get_nowplaying_id(void); -bool mp_util_is_streaming(const char *uri); bool mp_util_text_multiline_check(Evas_Object *obj,const char*text, const char*textstyle, int text_width, int text_height); bool mp_check_file_exist (const char *path); void mp_util_format_duration(char *time, int ms); diff --git a/src/common/mp-menu.c b/src/common/mp-menu.c index d012372..414d49f 100644 --- a/src/common/mp-menu.c +++ b/src/common/mp-menu.c @@ -26,7 +26,6 @@ #include "mp-playlist-mgr.h" #include "mp-ug-launch.h" #include "mp-item.h" -//#include "mp-player-drm.h" #include "mp-widget.h" #include "mp-ctxpopup.h" diff --git a/src/common/mp-play.c b/src/common/mp-play.c index df5b544..2d498bb 100644 --- a/src/common/mp-play.c +++ b/src/common/mp-play.c @@ -20,13 +20,11 @@ #include "mp-ta.h" #include "mp-player-control.h" #include "mp-player-mgr.h" -//#include "mp-player-drm.h" #include "mp-player-view.h" #include "mp-item.h" #include "mp-playlist-mgr.h" #include "mp-widget.h" #include "mp-app.h" -#include "mp-streaming-mgr.h" #include "mp-util.h" #include "mp-player-debug.h" #include "mp-minicontroller.h" @@ -141,11 +139,7 @@ mp_play_new_file(void *data, bool check_drm) int res = 0; PROFILE_IN("mp_player_control_ready_new_file"); - if (mp_util_is_streaming(current_item->uri)) { - res = mp_streaming_mgr_play_new_streaming(ad); - } else { - res = mp_player_control_ready_new_file(ad, check_drm); - } + res = mp_player_control_ready_new_file(ad, check_drm); PROFILE_OUT("mp_player_control_ready_new_file"); return res; diff --git a/src/common/mp-util.c b/src/common/mp-util.c index 2353da0..85883a2 100644 --- a/src/common/mp-util.c +++ b/src/common/mp-util.c @@ -614,23 +614,6 @@ mp_util_set_screen_mode(void *data, int mode) return true; } -bool -mp_util_is_streaming(const char *uri) -{ - if (uri == NULL || strlen(uri) == 0) { - return FALSE; - } - - if (uri == strstr(uri, "http://") || uri == strstr(uri, "https://") - || uri == strstr(uri, "rtp://") || uri == strstr(uri, "rtsp://")) { - DEBUG_TRACE("Streaming URI... OK"); - return TRUE; - } else { - //DEBUG_TRACE("uri check failed : [%s]", uri); - return FALSE; - } -} - void mp_to_lower(char *str) { int i = 0; while(str[i] != '\0') { diff --git a/src/core/include/mp-player-drm.h b/src/core/include/mp-player-drm.h deleted file mode 100644 index c8d6739..0000000 --- a/src/core/include/mp-player-drm.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (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 __MP_PLAYER_DRM_H_ -#define __MP_PLAYER_DRM_H_ - -typedef struct -{ - bool forward; - int version; - int constraint_type; - char validity[256]; - char description[256]; -} mp_drm; - -typedef struct -{ - char *type; - char *validity; -} mp_drm_right_status_t; - -typedef enum -{ - SETAS_REQUEST_CHECK_STATUS, - SETAS_REQUEST_REGISTER, - SETAS_REQUEST_UNREGISTER, -} mp_drm_setas_request_type_e; - -typedef enum { - DRM_CONTENT_INFO_NULL = -1, - DRM_CONTENT_INFO_AUTHOR, - DRM_CONTENT_INFO_RIGHTS_URL, - DRM_CONTENT_INFO_DESCRIPTION, -} drm_content_info_e; - -enum { - MP_DRM_CONSTRAINT_UNLIMITED = 0x0, - MP_DRM_CONSTRAINT_COUNT = 0x01, - MP_DRM_CONSTRAINT_DATE_TIME = 0x02, - MP_DRM_CONSTRAINT_INTERVAL = 0x04, - MP_DRM_CONSTRAINT_TIMED_COUNT = 0x08, - MP_DRM_CONSTRAINT_ACCUMLATED_TIME = 0x10, -}; - -typedef struct { - int constraints; - - int remaining_count; - bool date_time_expired; - int remaining_interval_sec; - int remaining_timed_count; - int remaining_acc_sec; -} mp_constraints_info_s; - -bool mp_drm_get_content_info(const char *path, drm_content_info_e first_info, ...); -void mp_drm_set_notify(void *data, char *message); -bool mp_drm_file_right(char *path); -bool mp_drm_is_initialized(char *path); -bool mp_drm_has_valid_ro(char *path); -EXPORT_API bool mp_drm_get_description(void *data, char *path); -bool mp_drm_check_forward(void *data, char *path); -bool mp_drm_get_left_ro_info(const char *path, mp_constraints_info_s *info, bool *has_valid_ro); -bool mp_drm_check_left_ro(void *data, char *path); -bool mp_drm_check_expiration(char *path, bool expired); -bool mp_drm_check_foward_lock(char *path); -bool mp_drm_check_oma_cd_sd(const char *path); -GList* mp_drm_get_right_status(const char *path); -void mp_drm_free_right_status(GList *list); -bool mp_drm_request_setas_ringtone(const char *path, mp_drm_setas_request_type_e type); -bool mp_drm_oma_is_setas_ringtone_possible(const char *path, bool *oma); - -#endif /*__MP_PLAYER_DRM_H_*/ diff --git a/src/core/include/mp-streaming-mgr.h b/src/core/include/mp-streaming-mgr.h deleted file mode 100644 index f939aea..0000000 --- a/src/core/include/mp-streaming-mgr.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (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 __MP_STREAMING_MGR_H__ -#define __MP_STREAMING_MGR_H__ - -#include - -bool mp_streaming_mgr_check_streaming(struct appdata *ad, const char *path); -bool mp_streaming_mgr_set_attribute(struct appdata *ad, player_h player); -bool mp_streaming_mgr_play_new_streaming(struct appdata *ad); - -#endif /* __MP_STREAMING_MGR_H__ */ diff --git a/src/core/mp-player-control.c b/src/core/mp-player-control.c index 72bddb9..2479855 100644 --- a/src/core/mp-player-control.c +++ b/src/core/mp-player-control.c @@ -32,7 +32,6 @@ #include "mp-minicontroller.h" #include "mp-lockscreenmini.h" #include "mp-widget.h" -#include "mp-streaming-mgr.h" #include "mp-ug-launch.h" #ifndef MP_SOUND_PLAYER @@ -420,9 +419,7 @@ mp_player_control_ready_new_file(void *data, bool check_drm) uri = item->uri; SECURE_DEBUG("current item pathname : [%s]", uri); - if (mp_util_is_streaming(uri)) { - - } else if (!mp_check_file_exist(uri)) { + if (!mp_check_file_exist(uri)) { ERROR_TRACE("There is no such file\n"); _mp_play_error_handler(ad, GET_SYS_STR("IDS_COM_POP_FILE_NOT_EXIST")); return -1; diff --git a/src/core/mp-player-drm.c b/src/core/mp-player-drm.c deleted file mode 100644 index 728181c..0000000 --- a/src/core/mp-player-drm.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (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. - */ - diff --git a/src/core/mp-player-mgr.c b/src/core/mp-player-mgr.c index 4d90973..1ccd98e 100644 --- a/src/core/mp-player-mgr.c +++ b/src/core/mp-player-mgr.c @@ -21,14 +21,12 @@ #include "mp-player-mgr.h" #include "mp-player-control.h" #include "mp-play.h" -/* #include "mp-player-drm.h" */ #include #include #include "mp-ta.h" #include "mp-player-debug.h" #include "mp-widget.h" -#include "mp-streaming-mgr.h" #include "mp-util.h" #include "mp-volume.h" #include "mp-minicontroller.h" diff --git a/src/core/mp-playlist-mgr.c b/src/core/mp-playlist-mgr.c index ec2008f..b6e0353 100644 --- a/src/core/mp-playlist-mgr.c +++ b/src/core/mp-playlist-mgr.c @@ -504,7 +504,7 @@ void mp_playlist_mgr_item_remove_deleted_item(mp_plst_mgr *playlist_mgr) item = list->data; list = g_list_next(list); if (item) { - if (item->uri && item->track_type == MP_TRACK_URI && !mp_util_is_streaming(item->uri)) { + if (item->uri && item->track_type == MP_TRACK_URI) { if (!mp_check_file_exist(item->uri)) { SECURE_DEBUG("uri = %s", item->uri); mp_playlist_mgr_item_remove_item(playlist_mgr, item); @@ -938,7 +938,7 @@ void mp_playlist_mgr_check_existance_and_refresh(mp_plst_mgr *playlist_mgr, bool while (list) { mp_plst_item *item = list->data; if (item) { - if (item->uri && item->track_type == MP_TRACK_URI && !mp_util_is_streaming(item->uri)) { + if (item->uri && item->track_type == MP_TRACK_URI) { SECURE_DEBUG("uri = %s", item->uri); char *temp_uri = g_strdup(item->uri); mp_to_lower(temp_uri); diff --git a/src/core/mp-streaming-mgr.c b/src/core/mp-streaming-mgr.c deleted file mode 100644 index 7be7fca..0000000 --- a/src/core/mp-streaming-mgr.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2015 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.1 (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 "music.h" -#include "mp-streaming-mgr.h" -#include "mp-http-mgr.h" -#include "mp-player-debug.h" -#include "mp-play.h" -#include "mp-widget.h" -#include "mp-player-mgr.h" -#include "mp-util.h" -#include "mp-player-view.h" -#include "mp-player-control.h" - -static bool _mp_streaming_mgr_play_streaming_real(struct appdata *ad); - -bool mp_streaming_mgr_check_streaming(struct appdata *ad, const char *path) -{ - MP_CHECK_FALSE(path); - - if (!mp_check_file_exist(path) && mp_util_is_streaming(path)) { - mp_debug("streaming...."); - return TRUE; - } - - return FALSE; -} - -bool mp_streaming_mgr_set_attribute(struct appdata *ad, player_h player) -{ - startfunc; - - return TRUE; -} - -bool mp_streaming_mgr_play_new_streaming(struct appdata *ad) -{ - startfunc; - MP_CHECK_FALSE(ad); - - bool ret = FALSE; - { /* connected */ - ret = _mp_streaming_mgr_play_streaming_real(ad); - if (ret == 0) { - mp_player_view_update_buffering_progress(GET_PLAYER_VIEW, 0); - } - } - - return ret; -} - -static bool _mp_streaming_mgr_play_streaming_real(struct appdata *ad) -{ - startfunc; - MP_CHECK_FALSE(ad); - - return mp_player_control_ready_new_file(ad, TRUE); -} - diff --git a/src/mp-main.c b/src/mp-main.c index 9b47ca7..0e80146 100644 --- a/src/mp-main.c +++ b/src/mp-main.c @@ -172,8 +172,6 @@ static void _mp_main_win_visibility_withdrawn_cb(void *data, Evas_Object *obj, v mp_player_mgr_safety_volume_set(ad->app_is_foreground); mp_view_view_pause(mp_view_mgr_get_top_view(GET_VIEW_MGR)); DEBUG_TRACE("ad->app_is_foreground: %d", ad->app_is_foreground); - - /* return ECORE_CALLBACK_PASS_ON; */ } static void _mp_main_win_visibility_normal_cb(void *data, Evas_Object *obj, void *event) @@ -186,8 +184,6 @@ static void _mp_main_win_visibility_normal_cb(void *data, Evas_Object *obj, void mp_player_mgr_safety_volume_set(ad->app_is_foreground); mp_view_view_resume(mp_view_mgr_get_top_view(GET_VIEW_MGR)); DEBUG_TRACE("ad->app_is_foreground: %d", ad->app_is_foreground); - - /* return ECORE_CALLBACK_PASS_ON; */ } static void _mp_main_win_focus_in_cb(void *data, Evas_Object *obj, void *event) @@ -195,14 +191,7 @@ static void _mp_main_win_focus_in_cb(void *data, Evas_Object *obj, void *event) struct appdata *ad = (struct appdata *)data; mp_retm_if(ad == NULL, "ad is null"); - /* TODO Know about the event */ - /*Ecore_X_Event_Window_Focus_In *ev = (Ecore_X_Event_Window_Focus_In *)event; - if (ev->win != ad->xwin) - return ECORE_CALLBACK_PASS_ON;*/ - /* TODO */ ad->is_focus_out = false; - /*if (ad->win_minicon && ad->b_minicontroller_show) - mp_minicontroller_destroy(ad); */ DEBUG_TRACE("ad->is_focus_out: %d", ad->is_focus_out); @@ -1467,11 +1456,6 @@ app_control(app_control_h app_control, void *data) _show_minicontroller(ad); } - /* TEMP_BLOCK */ - /* - if (power_get_state() == POWER_STATE_SCREEN_OFF) - ad->is_lcd_off = true; - */ display_state_e state; if (device_display_get_state(&state) == DISPLAY_STATE_SCREEN_OFF) { ad->is_lcd_off = true; @@ -1638,7 +1622,7 @@ main(int argc, char *argv[]) if (argc == 1) { DEBUG_TRACE("%s", argv[0]); - if (mp_util_is_streaming(argv[0]) || g_file_test(argv[0], G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) { + if (g_file_test(argv[0], G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) { test_uri = g_strdup(argv[0]); } } diff --git a/src/view/mp-all-view.c b/src/view/mp-all-view.c index ec9c112..ee060f4 100644 --- a/src/view/mp-all-view.c +++ b/src/view/mp-all-view.c @@ -85,69 +85,6 @@ int _mp_all_view_update(void *thiz) return 0; } -#ifdef MP_LIST_THUMBNAIL -static void _mp_all_view_view_as_select_cb(void *data, Evas_Object *obj, void *event_info) -{ - eventfunc; - MpAllView_t *all_view = (MpAllView_t *)data; - MP_CHECK(all_view); - mp_evas_object_del(all_view->more_btn_ctxpopup); - - /* remove popup */ - /* - - struct appdata *ad = mp_util_get_appdata(); - MP_CHECK(ad); - - if (mp_list_is_display_mode_changable(all_view->content_to_show)) { - Evas_Object *popup = mp_genlist_popup_create(ad->win_main, MP_POPUP_CHANGE_LIST_DISPLAY_MODE, all_view, ad); - MP_CHECK(popup); - - mp_evas_object_del(all_view->radio_main); - all_view->radio_main = elm_radio_add(popup); - elm_radio_state_value_set(all_view->radio_main, -1); - evas_object_smart_callback_add(all_view->radio_main, "changed", _mp_all_view_view_as_popup_radio_changed_cb, all_view); - evas_object_event_callback_add(all_view->radio_main, EVAS_CALLBACK_DEL, _mp_all_view_radio_main_del_cb, all_view); - evas_object_hide(all_view->radio_main); - - Evas_Object *genlist = evas_object_data_get(popup, "genlist"); - MP_CHECK(genlist); - - evas_object_data_set(genlist, "all_view", (void *)all_view); - - static Elm_Genlist_Item_Class itc; - itc.item_style = "1text.1icon.3"; - itc.func.text_get = _mp_all_view_view_as_popup_label_get; - itc.func.content_get = _mp_all_view_view_as_popup_content_get; - itc.func.state_get = NULL; - itc.func.del = NULL; - - int i = 0; - while (i < MP_LIST_DISPLAY_MODE_MAX) { - elm_genlist_item_append(genlist, &itc, (void *)i, NULL, ELM_GENLIST_ITEM_NONE, - _mp_all_view_view_as_popup_item_sel, all_view); - - ++i; - } - } - */ - MpListDisplayMode_e current = mp_list_get_display_mode(all_view->content_to_show); - mp_debug("List display change request [%d => %d]", current); - - if (MP_LIST_DISPLAY_MODE_NORMAL == current) { - current = MP_LIST_DISPLAY_MODE_THUMBNAIL; - } else if (MP_LIST_DISPLAY_MODE_THUMBNAIL == current) { - current = MP_LIST_DISPLAY_MODE_NORMAL; - } - - all_view->display_mode[all_view->tab_status] = current; - - if (all_view->content_to_show) { - mp_list_change_display_mode(all_view->content_to_show, current); - } -} -#endif - static void _mp_all_view_add_to_playlist_cb(void *data, Evas_Object *obj, void *event_info) { eventfunc; @@ -200,20 +137,6 @@ static void _mp_all_view_normal_more_btn_cb(void *data, Evas_Object *obj, void * STR_MP_SEARCH, NULL, mp_common_create_search_view_cb, view); } - /*view as*/ -#ifdef MP_LIST_THUMBNAIL - if (mp_list_is_display_mode_changable(view->content_to_show)) { - MpListDisplayMode_e current = mp_list_get_display_mode(view->content_to_show); - if (MP_LIST_DISPLAY_MODE_NORMAL == current) - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_ALL_THUMBNAIL_VIEW, MP_PLAYER_MORE_BTN_MORE_THUMBNAIL_VIEW_IMAGE, _mp_all_view_view_as_select_cb, view); - else if (MP_LIST_DISPLAY_MODE_THUMBNAIL == current) - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_ALL_LIST_VIEW, MP_PLAYER_MORE_BTN_MORE_LIST_VIEW_IMAGE, _mp_all_view_view_as_select_cb, view); - - } -#endif - #ifdef MP_FEATURE_PERSONAL_PAGE if (index == MP_TAB_SONGS) { if (mp_util_is_personal_page_on()) { @@ -232,9 +155,6 @@ static void _mp_all_view_normal_more_btn_cb(void *data, Evas_Object *obj, void * #endif - /*settings*/ - /*mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SETTINGS, MP_PLAYER_MORE_BTN_SETTING, mp_common_ctxpopup_setting_cb, view);*/ #ifndef MP_FEATURE_NO_END /*End*/ mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, diff --git a/src/view/mp-player-view.c b/src/view/mp-player-view.c index 3740743..fb3cde5 100644 --- a/src/view/mp-player-view.c +++ b/src/view/mp-player-view.c @@ -974,20 +974,9 @@ static void _mp_player_view_more_button_clicked_cb(void *data, Evas_Object *obj, } } #else - /*sound player more option*/ - /* - if (mp_player_mgr_get_player_type() == MP_PLAYER_TYPE_ASF ||track_info->track_type == MP_TRACK_ALLSHARE) { - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_CONNECTION_INFO, MP_PLAYER_MORE_BTN_CONN_INFO, _mp_player_view_connection_info_cb, view); - }*/ int count = 0; - /*if (playable && (track_info->track_type == MP_TRACK_URI) && file_in_db) { - mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, - STR_MP_SET_AS, MP_PLAYER_MORE_BTN_SET_AS, _ctxpopup_set_as_cb, view); - count++; - }*/ - if (!ad->samsung_link && (!mp_util_is_streaming(track_info->uri))) { + if (!ad->samsung_link) { mp_util_ctxpopup_item_append(view->more_btn_ctxpopup, STR_MP_DETAILS, MP_PLAYER_MORE_BTN_CONN_INFO, _ctxpopup_detail_cb, view); count++; diff --git a/src/widget/mp-now-playing-list.c b/src/widget/mp-now-playing-list.c index d770593..0a8afa7 100644 --- a/src/widget/mp-now-playing-list.c +++ b/src/widget/mp-now-playing-list.c @@ -553,7 +553,7 @@ mp_now_playing_list_refresh(MpNowPlayingList_t *list) mp_list_item_data_t *item_data = elm_object_item_data_get(it); if (item_data) { mp_plst_item *plst_item = item_data->plst_item; - if (plst_item && plst_item->uri && plst_item->track_type == MP_TRACK_URI && !mp_util_is_streaming(plst_item->uri)) { + if (plst_item && plst_item->uri && plst_item->track_type == MP_TRACK_URI) { if (!mp_file_exists(plst_item->uri) || (mmc_removed && strstr(plst_item->uri, MP_MMC_ROOT_PATH) == plst_item->uri)) { WARN_TRACE("removed uri %s", plst_item->uri); elm_object_item_del(it); -- 2.7.4