summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/mf-ug-cb.h60
-rw-r--r--src/include/mf-ug-conf.h156
-rw-r--r--src/include/mf-ug-db-handle.h45
-rw-r--r--src/include/mf-ug-dlog.h112
-rw-r--r--src/include/mf-ug-file-util.h44
-rw-r--r--src/include/mf-ug-fm-svc-wrapper.h41
-rw-r--r--src/include/mf-ug-fs-util.h493
-rw-r--r--src/include/mf-ug-inotify-handle.h51
-rw-r--r--src/include/mf-ug-list-play.h101
-rw-r--r--src/include/mf-ug-main.h303
-rw-r--r--src/include/mf-ug-media-db.h74
-rw-r--r--src/include/mf-ug-media-error.h49
-rw-r--r--src/include/mf-ug-media-types.h75
-rw-r--r--src/include/mf-ug-media.h69
-rw-r--r--src/include/mf-ug-music.h28
-rw-r--r--src/include/mf-ug-resource.h140
-rw-r--r--src/include/mf-ug-ringtone-view.h30
-rw-r--r--src/include/mf-ug-search-internal.h44
-rw-r--r--src/include/mf-ug-search.h147
-rw-r--r--src/include/mf-ug-util.h352
-rw-r--r--src/include/mf-ug-view.h29
-rw-r--r--src/include/mf-ug-widget.h58
-rw-r--r--src/include/mf-ug-winset.h209
23 files changed, 1671 insertions, 1039 deletions
diff --git a/src/include/mf-ug-cb.h b/src/include/mf-ug-cb.h
index 4ea12e2..8060894 100644
--- a/src/include/mf-ug-cb.h
+++ b/src/include/mf-ug-cb.h
@@ -1,52 +1,50 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_CB_H_
#define __DEF_MF_UG_CB_H_
#include <Elementary.h>
-#include <vconf.h>
-#include <power.h>
+#include <device/power.h>
+#include <system_settings.h>
+#include <storage.h>
#include "mf-ug-main.h"
#include "mf-ug-util.h"
#include "mf-ug-inotify-handle.h"
-void mf_ug_cb_back_button_cb(void *data, Evas_Object *obj, void *event_info);
+Eina_Bool mf_ug_cb_back_button_cb(void *data, Elm_Object_Item *it);
void mf_ug_cb_add_button_cb(void *data, Evas_Object *obj, void *event_info);
-void mf_ug_cb_goto_myfile_button_cb(void *data, Evas_Object *obj, void *event_info);
void mf_ug_cb_mass_storage_popup_cb(void *data);
-void mf_ug_cb_tab_bar_cb(void *data, const char *path);
-void mf_ug_cb_ctrl_bar_button_cb(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_cb_tab_bar_cb(void *data, char *path);
void mf_ug_cb_list_play_cb(ugListItemData *data, Evas_Object *obj, void *event_info);
void mf_ug_cb_select_info_show_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
void mf_ug_cb_select_info_hide_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
void mf_ug_cb_select_info_timeout_cb(void *data, Evas_Object *obj, void *event_info);
-void mf_ug_cb_mmc_changed_cb(keynode_t *key, void *data);
+void mf_ug_cb_mmc_changed_cb(int storage_id, storage_state_e state, void *user_data);
void mf_ug_cb_dir_update_cb(mf_ug_inotify_event event, char *name, void *data);
void mf_ug_cb_dir_pipe_cb(void *data, void *buffer, unsigned int nbyte);
-Eina_Bool mf_ug_cb_thumb_timer_cb(void *data);
int mf_ug_cb_set_mass_storage_state_cb(void *data);
-void mf_ug_cb_mass_storage_changed_cb(keynode_t *key, void *data);
void mf_ug_cb_upper_button_pressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_upper_button_unpressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_upper_click_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_home_button_pressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_home_button_unpressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_home_button_cb(void *data, Evas_Object * obj, void *event_info);
-void mf_ug_cb_sort_by_cb(void *data, Evas_Object *obj, void *event_info);
void mf_ug_search_view_enter_search_routine(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_warning_popup_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_reach_max_len_cb(void *data, Evas_Object * obj, void *event_info);
@@ -54,12 +52,22 @@ void mf_ug_cb_eraser_clicked_cb(void *data, Evas_Object *obj, const char *emissi
void mf_ug_cb_save_cb(void *data, Evas_Object *obj, void *event_info);
void mf_ug_cb_cancel_new_folder_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_create_new_folder(void *data, Evas_Object * obj, void *event_info);
-void mf_ug_cb_lcd_state_changed_cb(power_state_e state, void *user_data);
+//void mf_ug_cb_lcd_state_changed_cb(power_state_e state, void *user_data);
Eina_Bool mf_ug_cb_popup_del_idler_cb(void *data);
void mf_ug_cb_entry_button_pressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_entry_button_unpressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_play_button_unpressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_play_button_pressed_cb(void *data, Evas_Object * obj, void *event_info);
void mf_ug_cb_more_cb(void *data, Evas_Object * obj, void *event_info);
-
+void mf_ug_cb_default_ringtone_changed_cb(system_settings_key_e key, void *data);
+void mf_ug_cb_cancel_button_cb(void *data, Evas_Object *obj, void *event_info);
+bool mf_ug_cb_create_thumbnail(void *data, media_thumbnail_completed_cb callback);
+void mf_ug_cb_thumb_created_cb(media_content_error_e error, const char *path, void *user_data);
+void mf_ug_cb_delete_button_cb(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_ringtone_del_cb(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_cb_delete_button_popup_create(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_cb_delete_button_confirm_cb(void *data, Evas_Object *obj, void *event_info);
+void __mf_ug_popup_show_vk(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_select_all_cb(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_item_sel_all_press_cb(void *data, Evas_Object *obj, void *event_info);
#endif
diff --git a/src/include/mf-ug-conf.h b/src/include/mf-ug-conf.h
index 37c7c2d..6306bbf 100644
--- a/src/include/mf-ug-conf.h
+++ b/src/include/mf-ug-conf.h
@@ -1,80 +1,106 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_CONF_H_
#define __DEF_MF_UG_CONF_H_
#include <Elementary.h>
-#define UGPACKAGE "ug-myfile-efl"
-#define UGPKGNAME_MYFILE "org.tizen.myfile"
-#define UGLOCALEDIR "/usr/ug/res/locale"
-
-#ifdef UG_OPERATION_SELECT_MODE
-#define UG_OPTION_COUNT 6
-#else
-#define UG_OPTION_COUNT 5
-#endif
-#define UG_ERROR_RETURN (-1)
-
-#define UG_SELECT_MODE_MULTI_ALL "MULTI_ALL"
-#define UG_SELECT_MODE_SINGLE_ALL "SINGLE_ALL"
-#define UG_SELECT_MODE_MULTI_FILE "MULTI_FILE"
-#define UG_SELECT_MODE_SINGLE_FILE "SINGLE_FILE"
-#define UG_SELECT_MODE_IMPORT "IMPORT"
-#define UG_SELECT_MODE_IMPORT_PATH_SELECT "IMPORT_PATH_SELECT"
-#define UG_SELECT_MODE_IMPORT_SINGLE "IMPORT_SINGLE"
-#define UG_SELECT_MODE_EXPORT "EXPORT"
-#define UG_SELECT_MODE_SHORTCUT "SHORTCUT"
-#define UG_SELECT_MODE_SAVE "SAVE"
-
-#define UG_FILE_FILTER_IMAGE "IMAGE"
-#define UG_FILE_FILTER_SOUND "SOUND"
-#define UG_FILE_FILTER_VIDEO "VIDEO"
-#define UG_FILE_FILTER_FLASH "FLASH"
-#define UG_FILE_FILTER_FOLDER "FOLDER"
-#define UG_FILE_FILTER_IV "IV"
-#define UG_FILE_FILTER_IS "IS"
-#define UG_FILE_FILTER_VS "VS"
-#define UG_FILE_FILTER_ALL "ALL"
-
-#define UG_DRM_FILTER_ALL "DRM_ALL"
-#define UG_DRM_FILTER_NONE "DRM_NONE"
-#define UG_DRM_FILTER_WITHOUT_FL "DRM_WITHOUT_FL"
-
-#define UG_MUSIC_PATH "/opt/usr/media/Sounds and music/Music"
-#define UG_RINGTION_PATH "/opt/usr/media/Sounds and music/Ringtones"
-#define UG_SETTING_RINGTONE_PATH "/opt/share/settings/Ringtones"
-#define UG_SETTING_MSG_ALERTS_PATH "/opt/share/settings/Alerts"
-#define UG_SETTING_ALERTS_PATH "/opt/share/settings/Alarms"
-
-#define MAX_MESSAGE_LEN 1024
-#define ACCUMULATED_DATE 86400 /* 24*60*60 */
-
-#define DRM_MESSAGE_LEN 256
-#define UG_LABEL_STRING_LENGTH 128
+#define PKGNAME_SYSTEM "sys_string"
+#define UGPACKAGE "ug-myfile-efl"
+#define UGPKGNAME_MYFILE "org.tizen.myfile"
+#define UGLOCALEDIR "/usr/ug/res/locale"
+#define MF_IMAGE_HEAD "myfile_"
+
+#define UG_EDJ_PATH "/usr/ug/res/edje/ug-myfile-efl"
+#define UG_ICON_PATH "/usr/apps/ug-myfile-efl/res/images/ug-myfile-efl"
+
+#define UG_EDJ_NAVIGATIONBAR UG_EDJ_PATH"/ug_navibar_layout.edj"
+#define UG_EDJ_IMAGE UG_EDJ_PATH"/ug_edc_image_macro.edj"
+
+
+#define UG_GRP_LIST "thumbnail_only"
+#define UG_GRP_NAVI_VIEW "navigation_view"
+#define UG_GRP_NO_CONTENT "noContent"
+#define UG_OPTION_COUNT 8
+#define UG_ERROR_RETURN (-1)
+
+#define UG_SELECT_MODE_MULTI_ALL "MULTI_ALL"
+#define UG_SELECT_MODE_SINGLE_ALL "SINGLE_ALL"
+#define UG_SELECT_MODE_MULTI_FILE "MULTI_FILE"
+#define UG_SELECT_MODE_SINGLE_FILE "SINGLE_FILE"
+#define UG_SELECT_MODE_IMPORT "IMPORT"
+#define UG_SELECT_MODE_IMPORT_PATH_SELECT "IMPORT_PATH_SELECT"
+#define UG_SELECT_MODE_IMPORT_SINGLE "IMPORT_SINGLE"
+#define UG_SELECT_MODE_EXPORT "EXPORT"
+#define UG_SELECT_MODE_SHORTCUT "SHORTCUT"
+#define UG_SELECT_MODE_SAVE "SAVE"
+#define UG_SELECT_MODE_DOCUMENT_SHARE "DOCUMENT_SHARE"
+#define UG_SELECT_MODE_SSM_DOCUMENT_SHARE "SSM_DOCUMENT_SHARE"
+
+#define UG_FILE_FILTER_IMAGE "IMAGE"
+#define UG_FILE_FILTER_SOUND "SOUND"
+#define UG_FILE_FILTER_VIDEO "VIDEO"
+#define UG_FILE_FILTER_FLASH "FLASH"
+#define UG_FILE_FILTER_FOLDER "FOLDER"
+#define UG_FILE_FILTER_DOCUMENT "DOCUMENT"
+#define UG_FILE_FILTER_IV "IV"
+#define UG_FILE_FILTER_IS "IS"
+#define UG_FILE_FILTER_VS "VS"
+#define UG_FILE_FILTER_ALL "ALL"
+#define UG_FILE_MIME_TYPE_IMAGE "image/*"
+#define UG_FILE_MIME_TYPE_VIDEO "video/*"
+#define UG_FILE_MIME_TYPE_AUDIO "audio/*"
+#define UG_FILE_MIME_TYPE_DOCUMENT "document/*"
+#define UG_FILE_MIME_TYPE_ALL "*/*"
+#define UG_FILE_MIME_TYPE_DIR "inode/directory"
+
+
+#define UG_VIEW_MODE_DEFAULT_SOUND_ITEM "DEFAULT_SOUND_ITEM"
+
+#define MESSAGE "message"
+#define UG_MUSIC_PATH "/opt/usr/media/Sounds and music/Music"
+#define UG_RINGTION_PATH "/opt/usr/media/Sounds and music/Ringtones"
+#define UG_SETTING_RINGTONE_PATH "/opt/usr/share/settings/Ringtones"
+#define UG_SETTING_MSG_ALERTS_PATH "/opt/usr/share/settings/Alerts"
+#define UG_SETTING_ALERTS_PATH "/opt/usr/share/settings/Alarms"
+#define UG_SETTING_SMART_ALRAMS "/opt/usr/share/settings/Smartalarms"
+#define UG_SETTING_DEFAULT_RINGTONE_PATH "/opt/usr/share/settings/Ringtones/Over_the_horizon.ogg"
+#define UG_SETTING_DEFAULT_ALERT_PATH "/opt/usr/share/settings/Alerts/Beep_Once.ogg"
+
+
+#define MAX_MESSAGE_LEN 1024
+#define ACCUMULATED_DATE 86400 /* 24*60*60 */
+
+#define UG_LABEL_STRING_LENGTH 128
#define UG_TIME_FORMAT "02u:%02u:%02u"
#define UG_TIME_ARGS(t) \
- (t) / (3600), \
- ((t) / 60) % 60, \
- (t) % 60
+ (t) / (3600), \
+ ((t) / 60) % 60, \
+ (t) % 60
#define _EDJ(o) elm_layout_edje_get(o)
-#define INTERVAL_THUMB_UPDATE 0.5
+#define INTERVAL_THUMB_UPDATE 0.5
#endif /* __DEF_MYFILE_CONF_H_ */
diff --git a/src/include/mf-ug-db-handle.h b/src/include/mf-ug-db-handle.h
new file mode 100644
index 0000000..9d18e14
--- /dev/null
+++ b/src/include/mf-ug-db-handle.h
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_DB_HANDLE_DEF__
+#define __MF_UG_DB_HANDLE_DEF__
+
+#include "mf-ug-media-error.h"
+
+void mf_ug_db_handle_destory();
+int mf_ug_db_handle_create();
+MFDHandle *mf_ug_db_handle_get();
+void mf_ug_db_handle_get_shortcut_files(void *data);
+void mf_ug_db_handle_get_ringtone_files(void *data);
+int mf_ug_db_handle_del_ringtone(const char *ringtone_path);
+int mf_ug_db_handle_ringtone_in_db(const char *ringtone_path);
+int mf_ug_db_handle_ringtone_get_count();
+int mf_ug_db_handle_add_ringtone(const char *ringtone_path, const char *ringtone_name, int storage_type);
+bool mf_ug_db_handle_find_ringtone(const char* path);
+
+//1 Alert
+void mf_ug_db_handle_get_alert_files(void *data);
+int mf_ug_db_handle_del_alert(const char *alert_path);
+int mf_ug_db_handle_alert_in_db(const char *alert_path);
+int mf_ug_db_handle_alert_get_count();
+int mf_ug_db_handle_add_alert(const char *alert_path, const char *alert_name, int storage_type);
+bool mf_ug_db_handle_find_alert(const char* path);
+
+#endif
diff --git a/src/include/mf-ug-dlog.h b/src/include/mf-ug-dlog.h
index 50bf513..44bfbe9 100644
--- a/src/include/mf-ug-dlog.h
+++ b/src/include/mf-ug-dlog.h
@@ -1,18 +1,22 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_DLOG_H_
#define __DEF_MF_UG_DLOG_H_
@@ -26,7 +30,7 @@
#undef LOG_TAG
#endif
-#define LOG_TAG "MYFILE-UG"
+#define LOG_TAG "MYFILE-UG"
#include <dlog.h>
@@ -34,53 +38,69 @@
#define LOG_COLOR_RED "\033[31m"
#define LOG_COLOR_RESET "\033[0m"
+#define FONT_COLOR_RESET "\033[0m"
+#define FONT_COLOR_RED "\033[31m"
+#define FONT_COLOR_GREEN "\033[32m"
+#define FONT_COLOR_YELLOW "\033[33m"
+#define FONT_COLOR_BLUE "\033[34m"
+#define FONT_COLOR_PURPLE "\033[35m"
+#define FONT_COLOR_CYAN "\033[36m"
+#define FONT_COLOR_GRAY "\033[37m"
+
+#define SECURE_DEBUG(fmt, args...) SECURE_LOGD(FONT_COLOR_BLUE fmt FONT_COLOR_RESET, ##args)
+#define SECURE_INFO(fmt, args...) SECURE_LOGI(FONT_COLOR_GREEN fmt FONT_COLOR_RESET, ##args)
+#define SECURE_ERROR(fmt, args...) SECURE_LOGE(FONT_COLOR_RED fmt FONT_COLOR_RESET, ##args)
+
#define ug_debug(fmt , args...) LOGD("[%s][%d]debug message from ug-myfile-efl is : "fmt"\n", __func__, __LINE__, ##args)
#define ug_myfile_dlog(fmt , args...) LOGD("[%s][%d]debug message from myfile is : "fmt"\n", __func__, __LINE__, ##args)
#define UG_TRACE_BEGIN do {\
- {\
- LOGD("\n\033[0;35mENTER FUNCTION: %s. \033[0m\t%s:%d\n", \
- __FUNCTION__, (char *)(strrchr(__FILE__, '/') + 1), __LINE__);\
- } \
- } while (0);
+ {\
+ LOGD("\n\033[0;35mENTER FUNCTION: %s. \033[0m\t%s:%d\n", \
+ __FUNCTION__, (char *)(strrchr(__FILE__, '/') + 1), __LINE__);\
+ } \
+ } while (0);
#define UG_TRACE_END do {\
- {\
- LOGD("\n\033[0;35mEXIT FUNCTION: %s. \033[0m\t%s:%d\n", \
- __FUNCTION__, (char *)(strrchr(__FILE__, '/') + 1), __LINE__);\
- } \
- } while (0);
-#define ug_error(fmt, arg...) LOGE(LOG_COLOR_RED"[ %s : %d] "fmt""LOG_COLOR_RESET, __FUNCTION__, __LINE__,##arg)
+ {\
+ LOGD("\n\033[0;35mEXIT FUNCTION: %s. \033[0m\t%s:%d\n", \
+ __FUNCTION__, (char *)(strrchr(__FILE__, '/') + 1), __LINE__);\
+ } \
+ } while (0) ;
+#define ug_error(fmt, arg...) LOGE(LOG_COLOR_RED"[ %s : %d] "fmt""LOG_COLOR_RESET, __FUNCTION__, __LINE__,##arg)
#else
#define ug_myfile_dlog(fmt , args...) printf("[MYFILE][%40s:%4d] "fmt"\n", __func__, __LINE__, ##args)
#endif
-#define ug_mf_debug(fmt , args...) do { (void)0; } while (0)
-#define ug_mf_warnig(fmt , args...) do { (void)0; } while (0)
-#define ug_mf_error(fmt , args...) do { (void)0; } while (0)
-#define UG_MYFILE_TRACE_ERROR(fmt, arg...) do { LOGE("[%s][%d] "fmt"\n", strrchr(__FILE__, '/') + 1, __LINE__, ##arg); } while (0)
+#define ug_mf_debug(fmt , args...) do { (void)0; } while (0)
+#define ug_mf_warnig(fmt , args...) do { (void)0; } while (0)
+#define ug_mf_error(fmt , args...) do { (void)0; } while (0)
+#define UG_MYFILE_TRACE_ERROR(fmt, arg...) do { LOGE("[%s][%d] "fmt"\n", strrchr(__FILE__, '/') + 1, __LINE__, ##arg); } while (0)
#define ug_mf_retvm_if(expr, val, fmt, arg...) do { \
- if (expr) { \
- UG_MYFILE_TRACE_ERROR(fmt, ##arg); \
- return (val); \
- } \
- } while (0)
+ if (expr) { \
+ UG_MYFILE_TRACE_ERROR(fmt, ##arg); \
+ return (val); \
+ } \
+ } while (0)
#define ug_mf_retv_if(expr, val) do { \
- if (expr) { \
- return (val); \
- } \
- } while (0)
+ if (expr) { \
+ return (val); \
+ } \
+ } while (0)
#define ug_mf_retm_if(expr, fmt, arg...) do { \
- if (expr) { \
- UG_MYFILE_TRACE_ERROR(fmt, ##arg); \
- return; \
- } \
- } while (0)
-
-#define MF_CHECK(expr) ug_mf_retm_if(!(expr),"INVALID PARAM RETURN")
+ if (expr) { \
+ UG_MYFILE_TRACE_ERROR(fmt, ##arg); \
+ return; \
+ } \
+ } while (0)
+
+#define MF_CHECK(expr) ug_mf_retm_if(!(expr),"INVALID PARAM RETURN")
+#define MF_CHECK_FALSE(expr) ug_mf_retvm_if(!(expr), false, "INVALID PARAM RETURN FALSE")
+#define MF_CHECK_NULL(expr) ug_mf_retvm_if(!(expr), NULL, "INVALID PARAM RETURN NULL")
+#define MF_CHECK_VAL(expr, val) ug_mf_retvm_if(!(expr),val,"INVALID PARM RETURN val:0x%x", val)
#endif
diff --git a/src/include/mf-ug-file-util.h b/src/include/mf-ug-file-util.h
new file mode 100644
index 0000000..11877ba
--- /dev/null
+++ b/src/include/mf-ug-file-util.h
@@ -0,0 +1,44 @@
+/*
+* Copyright 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_FILE_UTIL_H__
+#define __MF_UG_FILE_UTIL_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <dirent.h>
+#include <Elementary.h>
+
+const char* mf_file_get(const char path[]);
+char* mf_dir_get(const char path[]);
+int mf_file_exists(const char *path);
+Eina_Bool mf_is_dir(const char *path);
+int mf_is_dir_empty(const char *path);
+int mf_mkdir(const char *dir);
+int mf_mkpath(const char *path);
+char *mf_strip_ext(const char *path);
+int mf_file_unlink (const char *filename);
+int mf_file_size(const char *filename);
+int mf_file_rmdir(const char *filename);
+Eina_List *mf_file_ls(const char *dir);
+int mf_file_recursive_rm(const char *dir);
+int mf_file_cp(const char *src,const char *dst);
+int mf_file_mv(const char *src, const char *dst);
+int mf_remove(const char *filename);
+#endif //__mf_FILE_UTIL_H__
diff --git a/src/include/mf-ug-fm-svc-wrapper.h b/src/include/mf-ug-fm-svc-wrapper.h
index 75d657b..bc2f2d9 100644
--- a/src/include/mf-ug-fm-svc-wrapper.h
+++ b/src/include/mf-ug-fm-svc-wrapper.h
@@ -1,18 +1,22 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_FM_SVC_WRAPPER_H_
#define __DEF_MF_UG_FM_SVC_WRAPPER_H_
@@ -20,12 +24,12 @@
#include <glib.h>
#include "mf-ug-main.h"
-#define MF_UG_PATH_INFO_MAX_LENGTH_PORTRAIT 35
+#define MF_UG_PATH_INFO_MAX_LENGTH_PORTRAIT 35
/* file information get/set */
unsigned long mf_ug_fm_svc_wapper_get_file_filter(int file_filter_mode);
-int mf_ug_fm_svc_wapper_get_drm_filter(int drm_filter_mode, unsigned long file_filter);
+
int mf_ug_fm_svc_wapper_get_file_list_by_filter(ugData *data, GString *fullpath, Eina_List **dir_list, Eina_List **filter_list);
bool mf_ug_fm_svc_wapper_is_root_path(void *data);
GString *mf_ug_fm_svc_wapper_get_file_name(GString *path);
@@ -35,11 +39,14 @@ gint mf_ug_fm_svc_wapper_get_folder_foldersystem(GString *path, bool *result);
GString *mf_ug_fm_svc_wrapper_get_file_parent_path(GString *fullpath);
char *mf_ug_fm_svc_wapper_path_info_get(char *original_path);
char *mf_ug_fm_svc_path_info_translate(char *path_info, int path_info_max_len);
-unsigned long mf_ug_fm_svc_wrapper_get_free_space(int state);
+//unsigned long mf_ug_fm_svc_wrapper_get_free_space(int state);
+int mf_ug_fm_svc_wrapper_get_free_space();
int mf_ug_fm_svc_wrapper_file_auto_rename(void *data, GString *fullpath, int file_name_type, GString **filename);
int mf_ug_fm_svc_wrapper_create_service(void *data, GString *fullpath);
bool mf_ug_fm_svc_wrapper_detect_duplication(GString *to);
int mf_ug_fm_svc_wrapper_create_p(const char *fullpath);
char *mf_ug_fm_svc_wrapper_translate_path(char *original_path);
+bool mf_ug_fm_svc_wapper_is_default_ringtone(void *data, char* selected_file);
+Eina_List *mf_ug_fm_svc_wrapper_level_path_get(const char *original_path);
#endif
diff --git a/src/include/mf-ug-fs-util.h b/src/include/mf-ug-fs-util.h
index 0027151..5d9ce15 100644
--- a/src/include/mf-ug-fs-util.h
+++ b/src/include/mf-ug-fs-util.h
@@ -1,18 +1,19 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_FS_UTIL_H_
#define __DEF_MF_UG_FS_UTIL_H_
@@ -27,306 +28,304 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <linux/fs.h>
-#include <Eina.h>
-
-#include <Elementary.h>
-#include <drm_client.h>
-#include <drm_client_types.h>
-#include <media_content.h>
+#include "Eina.h"
+#include "Elementary.h"
+#include "media_content.h"
#include "mf-ug-dlog.h"
-
-/* File system related value definition */
-#define FILE_EXT_LEN_MAX 8
-#define MYFILE_DIR_PATH_LEN_MAX 4096
-#define MYFILE_FILE_NAME_LEN_MAX 255
-#define MYFILE_FILE_PATH_LEN_MAX MYFILE_DIR_PATH_LEN_MAX + MYFILE_FILE_NAME_LEN_MAX
+/* File system related value definition */
+#define FILE_EXT_LEN_MAX 8
+#define MYFILE_DIR_PATH_LEN_MAX 4096
+#define MYFILE_FILE_NAME_LEN_MAX 255
+#define MYFILE_FILE_PATH_LEN_MAX MYFILE_DIR_PATH_LEN_MAX + MYFILE_FILE_NAME_LEN_MAX
-/* File system related String definition */
-#define PHONE_FOLDER "/opt/usr/media"
-#define MEMORY_FOLDER "/opt/storage/sdcard"
-#define PHONE_PARENT "/opt/usr"
-#define PHONE_NAME "media"
-#define STORAGE_PARENT "/opt/storage"
-#define MMC_NAME "sdcard"
+/* File system related String definition */
+#define PHONE_FOLDER "/opt/usr/media"
+#define MEMORY_FOLDER "/opt/storage/sdcard"
+#define PHONE_PARENT "/opt/usr"
+#define PHONE_NAME "media"
+#define STORAGE_PARENT "/opt/storage"
+#define MMC_NAME "sdcard"
-#define SOUNDS_FOLDER "/opt/usr/media/Sounds"
-#define DEBUG_FOLDER "SLP_debug"
+#define SOUNDS_FOLDER "/opt/usr/media/Sounds"
+#define DEBUG_FOLDER "SLP_debug"
-#define MYFILE_NAME_PATTERN "[\\:;*\"<>|?/]"
+#define MYFILE_NAME_PATTERN "[\\:;*\"<>|?/]"
-#define IMAGE_AND_VIDEO "Images and videos"
-#define SOUND_AND_MUSIC "Sounds and music"
-#define DOWNLOADS "Downloads"
-#define CAMERA_SHOTS "Camera shots"
+#define IMAGE_AND_VIDEO "Images and videos"
+#define SOUND_AND_MUSIC "Sounds and music"
+#define DOWNLOADS "Downloads"
+#define CAMERA_SHOTS "Camera shots"
-#define WALLPAPER "Wallpapers"
-#define MY_PHOTO_CLIPS "My photo clips"
-#define MY_ALBUM "My album" /*/_("IDS_MF_BODY_ACCESS_MORE_MY_ALBUM") */
-#define MY_VIDEO_CLIPS "My video clips" /*/_("IDS_MF_BODY_MY_VIDEO_CLIPS") */
+#define WALLPAPER "Wallpapers"
+#define MY_PHOTO_CLIPS "My photo clips"
+#define MY_ALBUM "My album" /*/_("IDS_MF_BODY_ACCESS_MORE_MY_ALBUM") */
+#define MY_VIDEO_CLIPS "My video clips" /*/_("IDS_MF_BODY_MY_VIDEO_CLIPS") */
-#define FM_RADIO "FM Radio" /*/dgettext("sys_string", "IDS_COM_HEADER_FMRADIO") */
-#define MUSIC "Music" /*/_("IDS_MF_BODY_MUSIC") */
-#define RINGTONES "Ringtones"
-#define VOICE_RECORDER "Voice recorder" /*/dgettext("sys_string", "IDS_COM_BODY_VOICE_RECORDER") */
-#define ALERTS "Alerts"
-#define OTHERS "Others" /*/dgettext("sys_string","IDS_COM_BODY_OTHERS") */
+#define FM_RADIO "FM Radio" /*/dgettext("sys_string", "IDS_COM_HEADER_FMRADIO") */
+#define MUSIC "Music" /*/_("IDS_MF_BODY_MUSIC") */
+#define RINGTONES "Ringtones"
+#define VOICE_RECORDER "Voice recorder" /*/dgettext("sys_string", "IDS_COM_BODY_VOICE_RECORDER") */
+#define ALERTS "Alerts"
+#define OTHERS "Others" /*/dgettext("sys_string","IDS_COM_BODY_OTHERS") */
-/* File system define default folder */
+/* File system define default folder */
-/* compile option */
+/* compile option */
#define UG_DEBUG_FOLDER_OPTION
#ifndef UG_ICON_PATH
-#define UG_ICON_PATH "/usr/ug/res/images/ug-myfile-efl"
+#define UG_ICON_PATH "/usr/apps/ug-myfile-efl/res/images/ug-myfile-efl"
#endif
#ifndef UG_DEFAULT_ICON
-#define UG_DEFAULT_ICON UG_ICON_PATH"/myfile_icon_etc.png"
+#define UG_DEFAULT_ICON "myfile_icon_etc.png"
#endif
-#define UG_ICON_FOLDER UG_ICON_PATH"/myfile_icon_folder.png"
-#define UG_ICON_FOLDER_OPEN UG_ICON_PATH"/myfile_icon_folder_open.png"
-
-#define UG_ICON_IMAGE UG_ICON_PATH"/myfile_icon_images.png"
-#define UG_ICON_VIDEO UG_ICON_PATH"/myfile_icon_video.png"
-#define UG_ICON_MUSIC UG_ICON_PATH"/myfile_icon_music.png"
-#define UG_ICON_SOUND UG_ICON_PATH"/myfile_icon_music.png"
-#define UG_ICON_PDF UG_ICON_PATH"/myfile_icon_pdf.png"
-#define UG_ICON_DOC UG_ICON_PATH"/myfile_icon_word.png"
-#define UG_ICON_PPT UG_ICON_PATH"/myfile_icon_ppt.png"
-#define UG_ICON_EXCEL UG_ICON_PATH"/myfile_icon_excel.png"
-#define UG_ICON_VOICE UG_ICON_PATH"/myfile_icon_music.png"
-#define UG_ICON_HTML UG_ICON_PATH"/myfile_icon_html.png"
-#define UG_ICON_FLASH UG_ICON_PATH"/myfile_icon_swf.png"
-#define UG_ICON_TXT UG_ICON_PATH"/myfile_icon_text.png"
-#define UG_ICON_VCONTACT UG_ICON_PATH"/myfile_icon_svg.png"
-#define UG_ICON_VCALENDAR UG_ICON_PATH"/myfile_icon_svg.png"
-#define UG_ICON_VNOTE UG_ICON_PATH"/myfile_icon_text.png"
-#define UG_ICON_RSS UG_ICON_PATH"/myfile_icon_rss.png"
-#define UG_ICON_JAVA UG_ICON_PATH"/myfile_icon_java.png"
-#define UG_ICON_MEMORY_SUB UG_ICON_PATH"/myfile_icon_mmc_sub.png"
-#define UG_ICON_MUSIC_PLAY_WHITE UG_ICON_PATH"/myfile_icon_control_play.png"
-#define UG_ICON_MUSIC_PAUSE_WHITE UG_ICON_PATH"/myfile_icon_control_pause.png"
-#define UG_ICON_MUSIC_PLAY_WHITE_PRESS UG_ICON_PATH"/myfile_icon_control_play_press.png"
-#define UG_ICON_MUSIC_PAUSE_WHITE_PRESS UG_ICON_PATH"/myfile_icon_control_pause_press.png"
-#define UG_ICON_ENTRY_FOLDER UG_ICON_PATH"/myfile_icon_entry_folder.png"
-#define UG_ICON_ENTRY_FOLDER_PRESS UG_ICON_PATH"/myfile_icon_entry_folder_press.png"
-
-#define UG_ICON_BLACK_THEME_UPPER UG_ICON_PATH"/myfile_icon_upper_folder_black_theme.png"
-#define UG_ICON_WHITE_THEME_UPPER UG_ICON_PATH"/myfile_icon_upper_folder_white_theme.png"
-
-#define UG_ICON_PHONE UG_ICON_PATH"/myfile_icon_phone.png"
-#define UG_ICON_MEMORY UG_ICON_PATH"/myfile_icon_mmc.png"
-#define UG_ICON_VIDEO_PLAY UG_ICON_PATH"/myfile_icon_video_play.png"
-
-#define UG_ICON_ITEM_PHONE UG_ICON_PATH"/U01_1st_icon_phone.png"
-#define UG_ICON_ITEM_MMC UG_ICON_PATH"/U01_1st_icon_memory_card.png"
+#define UG_ICON_FOLDER "myfile_icon_folder.png"
+#define UG_ICON_ITEM_SHORTCUT "my_files_folder_favorite.png"
+
+#define UG_ICON_IMAGE "myfile_icon_images.png"
+#define UG_ICON_VIDEO "myfile_icon_video.png"
+#define UG_ICON_MUSIC "myfile_icon_music.png"
+//#define UG_ICON_SOUND "myfile_icon_music.png"
+#define UG_ICON_PDF "myfile_icon_pdf.png"
+#define UG_ICON_DOC "myfile_icon_word.png"
+#define UG_ICON_PPT "myfile_icon_ppt.png"
+#define UG_ICON_EXCEL "myfile_icon_excel.png"
+//#define UG_ICON_VOICE "myfile_icon_music.png"
+#define UG_ICON_HTML "myfile_icon_html.png"
+#define UG_ICON_FLASH "myfile_icon_swf.png"
+#define UG_ICON_TXT "myfile_icon_text.png"
+#define UG_ICON_VCONTACT "myfile_icon_vcard.png"
+#define UG_ICON_VCALENDAR "myfile_icon_vcalender.png"
+//#define UG_ICON_VNOTE "myfile_icon_text.png"
+#define UG_ICON_RSS "myfile_icon_rss.png"
+#define UG_ICON_JAVA "myfile_icon_java.png"
+#define UG_ICON_TPK "myfile_icon_tpk.png"
+#define UG_ICON_SNB "myfile_icon_snb.png"
+#define UG_ICON_HWP "myfile_icon_hwp.png"
+#define UG_ICON_GUL "myfile_icon_etc.png"
+#define UG_ICON_MUSIC_PLAY_WHITE "myfile_icon_control_play.png"
+#define UG_ICON_MUSIC_PAUSE_WHITE "myfile_icon_control_pause.png"
+#define UG_ICON_MUSIC_PLAY_WHITE_PRESS "myfile_icon_control_play_press.png"
+#define UG_ICON_MUSIC_PAUSE_WHITE_PRESS "myfile_icon_control_pause_press.png"
+#define UG_ICON_ENTRY_FOLDER "myfile_icon_entry_folder.png"
+#define UG_ICON_ENTRY_FOLDER_PRESS "myfile_icon_entry_folder_press.png"
+#define UG_ICON_VIDEO_PLAY "myfile_icon_video_play.png"
+
+//#define UG_ICON_ITEM_PHONE "myfile_icon_folder.png"
+#define UG_ICON_ITEM_MMC "myfile_icon_folder_sdcard.png"
+#define UG_ICON_MMC "myfile_icon_grid_folder_card.png"
+
+#define UG_ICON_ADD "myfile_icon_add.png"
+#define UG_ICON_DELETE "myfile_icon_delete.png"
+#define UG_ICON_CREATE_FOLDER "myfile_icon_create_folder.png"
+#define UG_ICON_MULTI_NO_CONTENTS "00_nocontents_multimedia.png"
+
+#define UG_ICON_ITEM_ROOT_PHONE "myfile_icon_root_folder_device_memory.png"
+#define UG_ICON_ITEM_ROOT_MMC "my_files_sd_card.png"
+
typedef enum _mf_ug_fs_file_type mf_ug_fs_file_type;
enum _mf_ug_fs_file_type {
- UG_FILE_TYPE_NONE = 0,
- UG_FILE_TYPE_DIR, /**< Folder category */
- UG_FILE_TYPE_FILE, /**< File category */
- UG_FILE_TYPE_IMAGE, /**< Image category */
- UG_FILE_TYPE_VIDEO, /**< Video category */
- UG_FILE_TYPE_MUSIC, /**< Music category */
- UG_FILE_TYPE_SOUND, /**< Sound category */
- UG_FILE_TYPE_PDF, /**< Pdf category */
- UG_FILE_TYPE_DOC, /**< Word category */
- UG_FILE_TYPE_PPT, /**< Powerpoint category */
- UG_FILE_TYPE_EXCEL, /**< Excel category */
- UG_FILE_TYPE_VOICE, /**< Voice category */
- UG_FILE_TYPE_HTML, /**< Html category */
- UG_FILE_TYPE_FLASH, /**< Flash category */
- UG_FILE_TYPE_GAME, /**< Game category */
- UG_FILE_TYPE_APP, /**< Application category */
- UG_FILE_TYPE_THEME, /**< Theme category */
- UG_FILE_TYPE_TXT, /**< Txt category */
- UG_FILE_TYPE_VCONTACT, /**< Vcontact category */
- UG_FILE_TYPE_VCALENDAR, /**< Vcalendar category */
- UG_FILE_TYPE_VNOTE, /**< Vnote category */
- UG_FILE_TYPE_VBOOKMARK, /**< Vbookmark category */
- UG_FILE_TYPE_VIDEO_PROJECT, /**< Video editor project category */
- UG_FILE_TYPE_RADIO_RECORDED, /**< radio recorded clips category */
- UG_FILE_TYPE_MOVIE_MAKER, /**< Movie maker project category */
- UG_FILE_TYPE_SVG, /**< Svg category */
- UG_FILE_TYPE_RSS, /**< Rss reader file, *.opml */
- UG_FILE_TYPE_CERTIFICATION, /**< certification file, *.pem */
- UG_FILE_TYPE_JAVA, /**< java file, *.jad, *.jar */
- UG_FILE_TYPE_WGT, /**< wrt , *.wgt, *.wgt */
- UG_FILE_TYPE_DRM, /**< drm file , *.dcf */
- UG_FILE_TYPE_ETC, /**< Other files category */
- UG_FILE_TYPE_MAX
+ UG_FILE_TYPE_NONE = 0,
+
+ UG_FILE_TYPE_DIR, /**< Folder category */
+ UG_FILE_TYPE_FILE, /**< File category */
+ UG_FILE_TYPE_IMAGE, /**< Image category */
+ UG_FILE_TYPE_VIDEO, /**< Video category */
+ UG_FILE_TYPE_MUSIC, /**< Music category */
+
+ UG_FILE_TYPE_SOUND, /**< Sound category */
+ UG_FILE_TYPE_PDF, /**< Pdf category */
+ UG_FILE_TYPE_DOC, /**< Word category */
+ UG_FILE_TYPE_PPT, /**< Powerpoint category */
+ UG_FILE_TYPE_EXCEL, /**< Excel category */
+
+ UG_FILE_TYPE_VOICE, /**< Voice category */
+ UG_FILE_TYPE_HTML, /**< Html category */
+ UG_FILE_TYPE_FLASH, /**< Flash category */
+ UG_FILE_TYPE_GAME, /**< Game category */
+ UG_FILE_TYPE_APP, /**< Application category */
+
+ UG_FILE_TYPE_THEME, /**< Theme category */
+ UG_FILE_TYPE_TXT, /**< Txt category */
+ UG_FILE_TYPE_VCONTACT, /**< Vcontact category */
+ UG_FILE_TYPE_VCALENDAR, /**< Vcalendar category */
+ UG_FILE_TYPE_VNOTE, /**< Vnote category */
+
+ UG_FILE_TYPE_VBOOKMARK, /**< Vbookmark category */
+ UG_FILE_TYPE_VIDEO_PROJECT, /**< Video editor project category */
+ UG_FILE_TYPE_RADIO_RECORDED, /**< radio recorded clips category */
+ UG_FILE_TYPE_MOVIE_MAKER, /**< Movie maker project category */
+ UG_FILE_TYPE_SVG, /**< Svg category */
+
+ UG_FILE_TYPE_RSS, /**< Rss reader file, *.opml */
+ UG_FILE_TYPE_CERTIFICATION, /**< certification file, *.pem */
+ UG_FILE_TYPE_JAVA, /**< java file, *.jad, *.jar */
+ UG_FILE_TYPE_WGT, /**< wrt , *.wgt, *.wgt */
+ UG_FILE_TYPE_MP4_AUDIO,
+ UG_FILE_TYPE_MP4_VIDEO,
+ UG_FILE_TYPE_TPK, /**< *.tpk>*/
+ UG_FILE_TYPE_SNB, /**<*.snb> */
+ UG_FILE_TYPE_GUL, /**<*.gul> */
+
+ UG_FILE_TYPE_HWP, /**<*.hwp> */
+ UG_FILE_TYPE_ETC, /**< Other files category */
+ UG_FILE_TYPE_MAX
};
typedef enum _mf_ug_iter_category_filter_t mf_ug_iter_category_filter_t;
enum _mf_ug_iter_category_filter_t {
- UG_FILTER_CATEGORY_NONE = 0x00000000, /**< Default */
- UG_FILTER_CATEGORY_IMAGE = 0x00000001, /**< Image category */
- UG_FILTER_CATEGORY_VIDEO = 0x00000002, /**< Video category */
- UG_FILTER_CATEGORY_SOUND = 0x00000004, /**< Sound category */
- UG_FILTER_CATEGORY_VOICE = 0x00000008, /**< Voice category */
- UG_FILTER_CATEGORY_MUSIC = 0x00000010, /**< Music category */
- UG_FILTER_CATEGORY_HTML = 0x00000020, /**< Html category */
- UG_FILTER_CATEGORY_FLASH = 0x00000040, /**< Flash category */
- UG_FILTER_CATEGORY_GAME = 0x00000080, /**< Game category */
- UG_FILTER_CATEGORY_APP = 0x00000100, /**< Application category */
- UG_FILTER_CATEGORY_THEME = 0x00000200, /**< Theme category */
- UG_FILTER_CATEGORY_DOC = 0x00000400, /**< Word category */
- UG_FILTER_CATEGORY_EXCEL = 0x00000800, /**< Excel category */
- UG_FILTER_CATEGORY_PPT = 0x00001000, /**< Powerpoint category */
- UG_FILTER_CATEGORY_PDF = 0x00002000, /**< Pdf category */
- UG_FILTER_CATEGORY_TXT = 0x00004000, /**< Txt category */
- UG_FILTER_CATEGORY_VCONTACT = 0x00008000, /**< Vcontact category */
- UG_FILTER_CATEGORY_VCALENDAR = 0x00010000, /**< Vcalendar category */
- UG_FILTER_CATEGORY_VNOTE = 0x00020000, /**< Vnote category */
- UG_FILTER_CATEGORY_VBOOKMARK = 0x00040000, /**< Vbookmark category */
- UG_FILTER_CATEGORY_VIDEO_PROJECT = 0x00080000, /**< Video editor project category */
- UG_FILTER_CATEGORY_SVG = 0x00100000, /**< SVG category */
- UG_FILTER_CATEGORY_RSS = 0x00200000, /**< RSS category */
- UG_FILTER_CATEGORY_ETC = 0x00400000, /**< Other files category */
-
+ UG_FILTER_CATEGORY_NONE = 0x00000000, /**< Default */
+ UG_FILTER_CATEGORY_IMAGE = 0x00000001, /**< Image category */
+ UG_FILTER_CATEGORY_VIDEO = 0x00000002, /**< Video category */
+ UG_FILTER_CATEGORY_SOUND = 0x00000004, /**< Sound category */
+ UG_FILTER_CATEGORY_VOICE = 0x00000008, /**< Voice category */
+ UG_FILTER_CATEGORY_MUSIC = 0x00000010, /**< Music category */
+ UG_FILTER_CATEGORY_HTML = 0x00000020, /**< Html category */
+ UG_FILTER_CATEGORY_FLASH = 0x00000040, /**< Flash category */
+ UG_FILTER_CATEGORY_GAME = 0x00000080, /**< Game category */
+ UG_FILTER_CATEGORY_APP = 0x00000100, /**< Application category */
+ UG_FILTER_CATEGORY_THEME = 0x00000200, /**< Theme category */
+ UG_FILTER_CATEGORY_DOC = 0x00000400, /**< Word category */
+ UG_FILTER_CATEGORY_EXCEL = 0x00000800, /**< Excel category */
+ UG_FILTER_CATEGORY_PPT = 0x00001000, /**< Powerpoint category */
+ UG_FILTER_CATEGORY_PDF = 0x00002000, /**< Pdf category */
+ UG_FILTER_CATEGORY_TXT = 0x00004000, /**< Txt category */
+ UG_FILTER_CATEGORY_VCONTACT = 0x00008000, /**< Vcontact category */
+ UG_FILTER_CATEGORY_VCALENDAR = 0x00010000, /**< Vcalendar category */
+ UG_FILTER_CATEGORY_VNOTE = 0x00020000, /**< Vnote category */
+ UG_FILTER_CATEGORY_VBOOKMARK = 0x00040000, /**< Vbookmark category */
+ UG_FILTER_CATEGORY_VIDEO_PROJECT = 0x00080000, /**< Video editor project category */
+ UG_FILTER_CATEGORY_SVG = 0x00100000, /**< SVG category */
+ UG_FILTER_CATEGORY_RSS = 0x00200000, /**< RSS category */
+ UG_FILTER_CATEGORY_ETC = 0x00400000, /**< Other files category */
+ UG_FILTER_CATEGORY_MP4_VIDEO = 0x00800000,
+ UG_FILTER_CATEGORY_MP4_AUDIO = 0x0100000,
+ UG_FILTER_CATEGORY_SNB = 0x0200000,
+ UG_FILTER_CATEGORY_GUL = 0x0400000,
+ UG_FILTER_CATEGORY_HWP = 0x0800000,
+ UG_FILTER_CATEGORY_ALL = 0x8000000,
};
-typedef enum _mf_ug_drm_filter mf_ug_drm_filter;
-enum _mf_ug_drm_filter {
- MF_UG_FILTER_DRM_NONE = 0x00000000, /**< Default */
- MF_UG_FILTER_DRM_ALL = 0x00000001,
- MF_UG_FILTER_DRM_WITHOUT_FL = 0x00000002,
- MF_UG_FILTER_DRM_IMAGE = 0x00000004,
- MF_UG_FILTER_DRM_RINGTONE = 0x00000008,
-};
typedef enum _mf_ug_storage_type mf_ug_storage_type;
enum _mf_ug_storage_type {
- MF_UG_NONE,
- MF_UG_PHONE,
- MF_UG_MMC,
- MF_UG_MAX
-};
-
-
-
-typedef enum _mf_ug_drm_file_mime_type mf_ug_drm_file_mime_type;
-enum _mf_ug_drm_file_mime_type {
- MF_UG_DRM_UNKNOW_FILE = 0,
- MF_UG_DRM_IMAGE_FILE,
- MF_UG_DRM_RINGTONE_FILE,
- MF_UG_DRM_VIDEO_FILE,
- MF_UG_DRM_FILE_MAX
+ MF_UG_NONE,
+ MF_UG_PHONE,
+ MF_UG_MMC,
+ MF_UG_MAX
};
typedef enum _mf_ug_sort_option mf_ug_sort_option;
enum _mf_ug_sort_option {
- MF_UG_SORT_BY_NONE = 0, /**< Sort by default */
- MF_UG_SORT_BY_NAME_A2Z, /**< Sort by file name ascending */
- MF_UG_SORT_BY_SIZE_S2L, /**< Sort by file size ascending */
- MF_UG_SORT_BY_DATE_O2R, /**< Sort by file date ascending */
- MF_UG_SORT_BY_TYPE_A2Z, /**< Sort by file type ascending */
- MF_UG_SORT_BY_NAME_Z2A, /**< Sort by file name descending */
- MF_UG_SORT_BY_SIZE_L2S, /**< Sort by file size descending */
- MF_UG_SORT_BY_DATE_R2O, /**< Sort by file date descending */
- MF_UG_SORT_BY_TYPE_Z2A, /**< Sort by file type descending */
- MF_UG_SORT_BY_MAX
+ MF_UG_SORT_BY_NONE = 0, /**< Sort by default */
+ MF_UG_SORT_BY_NAME_A2Z, /**< Sort by file name ascending */
+ MF_UG_SORT_BY_SIZE_S2L, /**< Sort by file size ascending */
+ MF_UG_SORT_BY_DATE_O2R, /**< Sort by file date ascending */
+ MF_UG_SORT_BY_TYPE_A2Z, /**< Sort by file type ascending */
+ MF_UG_SORT_BY_NAME_Z2A, /**< Sort by file name descending */
+ MF_UG_SORT_BY_SIZE_L2S, /**< Sort by file size descending */
+ MF_UG_SORT_BY_DATE_R2O, /**< Sort by file date descending */
+ MF_UG_SORT_BY_TYPE_Z2A, /**< Sort by file type descending */
+ MF_UG_SORT_BY_MAX
} ;
typedef enum __MF_UG_SORT_BY_PRIORITY_SEQUENCE MF_UG_SORT_BY_PRIORITY_SEQUENCE;
enum __MF_UG_SORT_BY_PRIORITY_SEQUENCE {
- MF_UG_SORT_BY_PRIORITY_TYPE_A2Z,
- MF_UG_SORT_BY_PRIORITY_TYPE_Z2A,
- MF_UG_SORT_BY_PRIORITY_DATE_O2R,
- MF_UG_SORT_BY_PRIORITY_DATE_R2O,
- MF_UG_SORT_BY_PRIORITY_SIZE_S2L,
- MF_UG_SORT_BY_PRIORITY_SIZE_L2S,
+ MF_UG_SORT_BY_PRIORITY_TYPE_A2Z,
+ MF_UG_SORT_BY_PRIORITY_TYPE_Z2A,
+ MF_UG_SORT_BY_PRIORITY_DATE_O2R,
+ MF_UG_SORT_BY_PRIORITY_DATE_R2O,
+ MF_UG_SORT_BY_PRIORITY_SIZE_S2L,
+ MF_UG_SORT_BY_PRIORITY_SIZE_L2S,
};
-/* File operation error check options definition */
-#define MF_ERROR_CHECK_SRC_ARG_VALID 0x0001
-#define MF_ERROR_CHECK_SRC_EXIST 0x0002
-#define MF_ERROR_CHECK_SRC_PATH_VALID 0x0004
-#define MF_ERROR_CHECK_DUPLICATED 0x0008
+/* File operation error check options definition */
+#define MF_ERROR_CHECK_SRC_ARG_VALID 0x0001
+#define MF_ERROR_CHECK_SRC_EXIST 0x0002
+#define MF_ERROR_CHECK_SRC_PATH_VALID 0x0004
+#define MF_ERROR_CHECK_DUPLICATED 0x0008
-/* File system error definition */
+/* File system error definition */
#define MF_ERROR_MASKL16 0xFFFF
-
#define MF_ERROR_SET(X) (X & MF_ERROR_MASKL16)
-
#define MID_CONTENTS_MGR_ERROR 0
-
-#define MYFILE_ERR_NONE (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x00)) /**< No error */
+#define MYFILE_ERR_NONE (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x00)) /**< No error */
/*/1-10*/
-#define MYFILE_ERR_SRC_ARG_INVALID (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x01)) /**< invalid src argument */
-#define MYFILE_ERR_DST_ARG_INVALID (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x02)) /**< invalid dst argument */
-#define MYFILE_ERR_DIR_OPEN_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x03)) /**< exception of dir open*/
-#define MYFILE_ERR_INVALID_DIR_PATH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x04)) /**< exception of invalid dir path */
-#define MYFILE_ERR_INVALID_FILE_NAME (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x05)) /**< exception of invalid file name */
-#define MYFILE_ERR_INVALID_FILE_PATH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x06)) /**< exception of invalid file path */
-#define MYFILE_ERR_DRM_PERMISSION_DENY (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x07)) /**< can't copy/move drm file because of permission */
-#define MYFILE_ERR_SRC_NOT_EXIST (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x08)) /**< source not found */
-#define MYFILE_ERR_STORAGE_TYPE_ERROR (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x09)) /**< storage type error */
-#define MYFILE_ERR_EXT_GET_ERROR (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0a)) /**< get ext type failed */
-#define MYFILE_ERR_GET_STAT_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0b)) /**< get stat failed */
-#define MYFILE_ERR_GET_CATEGORY_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0c)) /**< get file category failed */
-#define MYFILE_ERR_GET_VCONF_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0d)) /**< get vconf value failed */
-#define MYFILE_ERR_INVALID_ARG (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0e)) /**< argument of function is not valid */
-#define MYFILE_ERR_ALLOCATE_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0f))
-#define MYFILE_ERR_LIST_PLAY_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x10))
-#define MYFILE_ERR_INVALID_PATH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x11)) /**< invalid path string */
-#define MYFILE_ERR_GET_THUMBNAIL_FAILED (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x12)) /**<get thumbnail failed */
-#define MYFILE_ERR_UNKNOW_ERROR (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x13)) /**<unknow error */
-#define MYFILE_ERR_NO_FREE_SPACE (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x14)) /**< get free space failed */
-#define MYFILE_ERR_DUPLICATED_NAME (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x15)) /**< exception of duplicated dir name*/
-#define MYFILE_ERR_ALLOCATE_MEMORY_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x16)) /**< exception of memory allocation */
-#define MYFILE_ERR_GET_LOGIC_PATH_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x17)) /**< get logical path failed */
-#define MYFILE_ERR_GENERATE_NAME_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x18)) /**< generate name failed */
-#define MYFILE_ERR_DIR_CREATE_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x19)) /**< exception of create dir */
-#define MYFILE_ERR_GET_PARENT_PATH_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x1a)) /**< get parent path failed */
-#define MYFILE_ERR_EXCEED_MAX_LENGTH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x1b)) /**< length of file/dir path exceeds maximum length*/
-
-/* File system related callback definition */
-
+#define MYFILE_ERR_SRC_ARG_INVALID (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x01)) /**< invalid src argument */
+#define MYFILE_ERR_DST_ARG_INVALID (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x02)) /**< invalid dst argument */
+#define MYFILE_ERR_DIR_OPEN_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x03)) /**< exception of dir open*/
+#define MYFILE_ERR_INVALID_DIR_PATH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x04)) /**< exception of invalid dir path */
+#define MYFILE_ERR_INVALID_FILE_NAME (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x05)) /**< exception of invalid file name */
+#define MYFILE_ERR_INVALID_FILE_PATH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x06)) /**< exception of invalid file path */
+#define MYFILE_ERR_SRC_NOT_EXIST (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x08)) /**< source not found */
+#define MYFILE_ERR_STORAGE_TYPE_ERROR (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x09)) /**< storage type error */
+#define MYFILE_ERR_EXT_GET_ERROR (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0a)) /**< get ext type failed */
+#define MYFILE_ERR_GET_STAT_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0b)) /**< get stat failed */
+#define MYFILE_ERR_GET_CATEGORY_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0c)) /**< get file category failed */
+#define MYFILE_ERR_GET_CONF_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0d)) /**< get conf value failed */
+#define MYFILE_ERR_INVALID_ARG (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0e)) /**< argument of function is not valid */
+#define MYFILE_ERR_ALLOCATE_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x0f))
+#define MYFILE_ERR_LIST_PLAY_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x10))
+#define MYFILE_ERR_INVALID_PATH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x11)) /**< invalid path string */
+#define MYFILE_ERR_GET_THUMBNAIL_FAILED (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x12)) /**<get thumbnail failed */
+#define MYFILE_ERR_UNKNOW_ERROR (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x13)) /**<unknow error */
+#define MYFILE_ERR_NO_FREE_SPACE (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x14)) /**< get free space failed */
+#define MYFILE_ERR_DUPLICATED_NAME (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x15)) /**< exception of duplicated dir name*/
+#define MYFILE_ERR_ALLOCATE_MEMORY_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x16)) /**< exception of memory allocation */
+#define MYFILE_ERR_GET_LOGIC_PATH_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x17)) /**< get logical path failed */
+#define MYFILE_ERR_GENERATE_NAME_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x18)) /**< generate name failed */
+#define MYFILE_ERR_DIR_CREATE_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x19)) /**< exception of create dir */
+#define MYFILE_ERR_GET_PARENT_PATH_FAIL (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x1a)) /**< get parent path failed */
+#define MYFILE_ERR_EXCEED_MAX_LENGTH (MID_CONTENTS_MGR_ERROR - MF_ERROR_SET(0x1b)) /**< length of file/dir path exceeds maximum length*/
+
+/* File system related callback definition */
typedef struct _ugFsNodeInfo ugFsNodeInfo;
struct _ugFsNodeInfo {
- char path[MYFILE_DIR_PATH_LEN_MAX];
- char name[MYFILE_FILE_NAME_LEN_MAX];
- time_t date;
- mf_ug_fs_file_type type;
- char *ext;
- unsigned int size;
+ char *path;
+ char *name;
+ time_t date;
+ mf_ug_fs_file_type type;
+ char *ext;
+ unsigned int size;
+ int storage_type;
};
-/********** File Attribute Related **********/
+/********** File Attribute Related **********/
int mf_ug_file_attr_get_file_stat(const char *filename, ugFsNodeInfo ** node);
-
-int mf_ug_file_attr_get_file_category(const char *filepath, mf_ug_fs_file_type * category);
+int mf_ug_file_attr_get_file_category(char *filepath, mf_ug_fs_file_type * category);
int mf_ug_file_attr_is_dir(const char *filepath);
int mf_ug_file_attr_get_store_type_by_full(const char *filepath, mf_ug_storage_type * store_type);
-int mf_ug_file_attr_is_drm_file(const char *file_fullpath);
int mf_ug_file_attr_get_file_ext(const char *filepath, char **file_ext);
int mf_ug_file_attr_is_right_dir_path(const char *dir_path);
int mf_ug_file_attr_is_right_file_path(const char *file_path);
int mf_ug_file_attr_is_duplicated_name(const char *dir, const char *name);
int mf_ug_file_attr_get_logical_path_by_full(const char *full_path, char **path);
int mf_ug_file_attr_is_valid_name(const char *filename);
-
-/********** File Operation Related **********/
-int mf_ug_fs_oper_read_dir(const char *path, Eina_List **dir_list, Eina_List **file_list);
-int mf_ug_fs_oper_list_filter(Eina_List *in_list, Eina_List **out_list, int option, int drm_opt);
-int mf_ug_fs_oper_list_filter_by_extension(Eina_List *in_list, Eina_List **out_list, char *ext);
-int mf_ug_file_attr_get_file_icon(const char *file_path, int *error_code, char **thumbnail);
-mf_ug_drm_file_mime_type mf_ug_fs_oper_get_drm_type(char *path);
+char *mf_ug_file_attr_default_icon_get_by_type(mf_ug_fs_file_type ftype);
int mf_ug_file_attr_is_system_dir(char *fullpath, bool * result);
+char *mf_ug_file_attr_sound_title_get(const char *fullpath);
+int mf_ug_file_attr_get_file_size(const char *filename, off_t *size);
+int mf_ug_file_attr_get_file_icon(char *file_path, int *error_code, char **thumbnail,
+ media_info_h *media_info);
+mf_ug_fs_file_type mf_ug_file_attr_get_file_type(const char *mime);
mf_ug_fs_file_type mf_ug_file_attr_get_file_type_by_mime(const char *file_path);
+
+/********** File Operation Related **********/
+int mf_ug_fs_oper_read_dir(char *path, Eina_List **dir_list, Eina_List **file_list);
+int mf_ug_fs_oper_list_filter(Eina_List *in_list, Eina_List **out_list, int option);
+int mf_ug_fs_oper_list_filter_by_extension(Eina_List *in_list, Eina_List **out_list, char *ext);
int mf_ug_fs_oper_create_dir(const char *dir);
void mf_ug_fs_oper_sort_list(Eina_List **list, int sort_opt);
-int mf_ug_fs_oper_drm_is_action_allowed(const char *path, drm_action_type_e action, drm_setas_category_e category);
-bool mf_ug_fs_oper_drm_is_valid(const char *path, drm_permission_type_e perm_type);
+
#endif
diff --git a/src/include/mf-ug-inotify-handle.h b/src/include/mf-ug-inotify-handle.h
index 8c85604..f3078dd 100644
--- a/src/include/mf-ug-inotify-handle.h
+++ b/src/include/mf-ug-inotify-handle.h
@@ -1,33 +1,38 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_INOTIFY_HANDLE_H
#define __DEF_MF_UG_INOTIFY_HANDLE_H
typedef enum _mf_ug_inotify_event mf_ug_inotify_event;
enum _mf_ug_inotify_event {
- UG_MF_INOTI_NONE = 0,
- UG_MF_INOTI_CREATE,
- UG_MF_INOTI_DELETE,
- UG_MF_INOTI_MODIFY,
- UG_MF_INOTI_MOVE_OUT,
- UG_MF_INOTI_MOVE_IN,
- UG_MF_INOTI_DELETE_SELF,
- UG_MF_INOTI_MOVE_SELF,
- UG_MF_INOTI_MAX,
+ UG_MF_INOTI_NONE = 0,
+ UG_MF_INOTI_CREATE,
+ UG_MF_INOTI_DELETE,
+ UG_MF_INOTI_MODIFY,
+ UG_MF_INOTI_MOVE_OUT,
+ UG_MF_INOTI_MOVE_IN,
+ UG_MF_INOTI_DELETE_SELF,
+ UG_MF_INOTI_MOVE_SELF,
+ UG_MF_INOTI_MAX,
};
typedef void (*mf_ug_inotify_cb) (mf_ug_inotify_event event, char *name, void *data);
diff --git a/src/include/mf-ug-list-play.h b/src/include/mf-ug-list-play.h
index 493785d..36c9356 100644
--- a/src/include/mf-ug-list-play.h
+++ b/src/include/mf-ug-list-play.h
@@ -1,18 +1,20 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_LIST_PLAY_H
#define __MF_UG_LIST_PLAY_H
@@ -21,53 +23,60 @@
#include <sound_manager.h>
typedef enum {
- MF_PLAYER_CB_TYPE_STARTED,
- MF_PLAYER_CB_TYPE_PAUSED,
- MF_PLAYER_CB_TYPE_COMPLETED,
- MF_PLAYER_CB_TYPE_INTURRUPTED,
- MF_PLAYER_CB_TYPE_ERROR,
- MF_PLAYER_CB_TYPE_BUFFERING,
- MF_PLAYER_CB_TYPE_PREPARE,
- MF_PLAYER_CB_TYPE_NUM,
+ MF_PLAYER_CB_TYPE_STARTED,
+ MF_PLAYER_CB_TYPE_PAUSED,
+ MF_PLAYER_CB_TYPE_COMPLETED,
+ MF_PLAYER_CB_TYPE_INTURRUPTED,
+ MF_PLAYER_CB_TYPE_ERROR,
+ MF_PLAYER_CB_TYPE_BUFFERING,
+ MF_PLAYER_CB_TYPE_PREPARE,
+ MF_PLAYER_CB_TYPE_NUM,
} mf_player_cb_type;
typedef enum {
- MF_VOLUME_NONE,
- MF_VOLUME_ALERT,
- MF_VOLUME_NOTIFICATION,
- MF_VOLUME_RINGTONE,
- MF_VOLUME_NUM
+ MF_VOLUME_NONE,
+ MF_VOLUME_ALERT,
+ MF_VOLUME_NOTIFICATION,
+ MF_VOLUME_RINGTONE,
+ MF_VOLUME_NUM
} mf_player_volume_type;
typedef struct __mf_player_cbs mf_player_cbs;
struct __mf_player_cbs{
- /* player callbacks */
- /*note: start callback and paused callback for player have been removed*/
- /*player_started_cb started_cb;*/
- /*player_paused_cb paused_cb;*/
- player_completed_cb completed_cb;
- player_interrupted_cb interrupted_cb;
- player_error_cb error_cb;
- player_buffering_cb buffering_cb;
- player_prepared_cb prepare_cb;
+ /* player callbacks */
+ /*note: start callback and paused callback for player have been removed*/
+ /*player_started_cb started_cb;*/
+ /*player_paused_cb paused_cb;*/
+ player_completed_cb completed_cb;
+ player_interrupted_cb interrupted_cb;
+ player_error_cb error_cb;
+ player_buffering_cb buffering_cb;
+ player_prepared_cb prepare_cb;
- /* callback user data */
- void *user_data[MF_PLAYER_CB_TYPE_NUM];
+ /* callback user data */
+ void *user_data[MF_PLAYER_CB_TYPE_NUM];
};
typedef struct {
- mf_player_cb_type cb_type;
+ mf_player_cb_type cb_type;
- union {
- player_interrupted_code_e interrupted_code;
- int error_code;
- int percent;
- } param;
+ union {
+ player_interrupted_code_e interrupted_code;
+ int error_code;
+ int percent;
+ } param;
} mf_player_cb_extra_data;
-void mf_ug_player_vol_set(const char *path);
-void mf_ug_list_play_pause(void *data);
+void mf_ug_player_vol_set(void* data, const char *path);
+void mf_ug_player_vol_reset_default_value(void* data);
+
+bool mf_ug_list_play_pause(void *data);
+void mf_ug_list_disable_play_itc(void *data, bool disable);
+bool mf_ug_is_default_ringtone(void *data, const char *path);
+int mf_ug_list_play_earjack_monitor(void *data);
+void mf_ug_destory_earjack_monitor();
+bool mf_ug_is_silent(void *data, const char *path);
#endif
diff --git a/src/include/mf-ug-main.h b/src/include/mf-ug-main.h
index 4414940..93765ab 100644
--- a/src/include/mf-ug-main.h
+++ b/src/include/mf-ug-main.h
@@ -1,203 +1,200 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_MAIN_H_
#define __DEF_MF_UG_MAIN_H_
#define __ARM__
-#include <Elementary.h>
-#include <Ethumb.h>
+#include <stdbool.h>
#include <glib.h>
-#include <Ecore.h>
#include <glib-object.h>
+
+#include <app.h>
+#include <Ecore.h>
+#include <Elementary.h>
+#include <Ethumb.h>
+#include <player.h>
#include <ui-gadget-module.h>
#include <ui-gadget.h>
-#include <app.h>
-#include <stdbool.h>
-#include <drm_client.h>
-#include <drm_client_types.h>
+#include <device/power.h>
+#include <device/callback.h>
#include <media_content.h>
-#include <player.h>
-
-
#include "mf-ug-dlog.h"
-#include "../../data/ug_edc_common.h"
#include "mf-ug-conf.h"
#include "mf-ug-search.h"
-/*********** Global Definitions ***********/
+#include "mf-ug-media-types.h"
+/*********** Global Definitions ***********/
#ifndef UG_MODULE_API
#define UG_MODULE_API __attribute__ ((visibility("default")))
#endif
-typedef void (*ugCallBack) (void *, Evas_Object *, void *);
-
-typedef struct _ugNaviBar ugNaviBar;
-
-struct _ugNaviBar {
- char *ug_pNaviLabel;
- char *ug_pNaviTitle;
- char *ug_pCurrentPath;
- bool ug_bNaviFlagInUse;
-};
+#define SILENT "silent"
+#define SILENT_SHOW "silent show"
+#define DEFAULT_RINGTONE_MARK "default ringtone"
+typedef void (*ugCallBack) (void *, Evas_Object *, void *);
typedef struct _ugMainWindow ugMainWindow;
struct _ugMainWindow {
- Evas_Object *ug_pWindow;
- Evas_Object *ug_pBackGround;
- Evas_Object *ug_pTabBackGround;
- Evas_Object *ug_pMainLayout;
- Evas_Object *ug_pNormalPopup;
- Evas_Object *ug_pSearchLabel;
- Evas_Object *ug_pSelectInfoLayout;
- Evas_Object *ug_pRadioGroup;
- Evas_Object *ug_pTabBar;
-
- Evas_Object *ug_pNaviBar;
- Evas_Object *ug_pNaviLayout;
- Evas_Object *ug_pNaviGenlist;
- Evas_Object *ug_pNaviCtrlBar;
- Evas_Object *ug_pNaviBox;
-
- Evas_Object *ug_pEditField;
- Evas_Object *ug_pEntry;
- Evas_Object *ug_pSelectAllLayout;
- Evas_Object *ug_pSelectAllCheckBox;
- Evas_Object *ug_pSearchPopup;
- Evas_Object *ug_pContextPopup;
- Evas_Object *ug_pNewFolderPopup;
-
- Elm_Object_Item *ug_pPreNaviItem;
- Elm_Object_Item *ug_pNaviItem;
- Eina_List *ug_pNaviBarList;
- Evas_Object *ug_ctrlBar;
-
+ Evas_Object *ug_pWindow;
+ Evas_Object *ug_pBackGround;
+ Evas_Object *ug_pTabBackGround;
+ Evas_Object *ug_pMainLayout;
+ Evas_Object *ug_pConformant;
+ Evas_Object *ug_pNormalPopup;
+ Evas_Object *ug_pSearchLabel;
+ Evas_Object *ug_pSelectInfoLayout;
+ Evas_Object *ug_pRadioGroup;
+
+ Evas_Object *ug_pNaviBar;
+ Evas_Object *ug_pNaviLayout;
+ Evas_Object *ug_pNaviGenlist;
+ Evas_Object *ug_pNaviCtrlBar;
+ Evas_Object *ug_pNaviBox;
+
+ Evas_Object *ug_pEditField;
+ Evas_Object *ug_pEntry;
+ Evas_Object *ug_pSelectAllLayout;
+ Evas_Object *ug_pSelectAllCheckBox;
+ Evas_Object *ug_pSearchPopup;
+ Evas_Object *ug_pContextPopup;
+ Evas_Object *ug_pNewFolderPopup;
+ Evas_Object *pPathinfo;
+ char *ug_pNaviTitle;
+
+ Elm_Object_Item *ug_pPreNaviItem;
+ Elm_Object_Item *ug_pNaviItem;
+ Eina_List *ug_pNaviBarList;
};
typedef struct _ugStatus ugStatus;
struct _ugStatus {
- GString *ug_pPath;
- int ug_iState;
- int ug_iSortType;
- int ug_iRadioOn;
- int ug_iMmcFlag;
- int ug_iCtrlBarType;
- int ug_iRadioValue; /** current the radio box selected item value **/
- int ug_iSelectedSortType;
- int ug_iMore;
- int ug_iCheckedCount;
- int ug_iTotalCount;
- int ug_iViewType;
-
- bool ug_bAudioPlayFlag;
- bool ug_bInstallFlag;
- bool ug_bSettingEntry;
- bool ug_bInSettingView;
- bool ug_bNoContentFlag;
- bool ug_bCancelDisableFlag;
- bool ug_b_NaviPushFlag;
- bool ug_bRingtoneSet;
- Eina_Bool ug_bSelectAllChecked;
- int ug_iThemeType;
- char *ug_pUpper_folder;
- char *ug_pEntryPath;
- char *monitor_path;
- bool ug_bUpperFlag;
- Elm_Genlist_Item_Class ug_itc;
- Elm_Genlist_Item_Class ug_topitc;
- Elm_Genlist_Item_Class ug_separtor_no_bottom_line_itc;
- Elm_Genlist_Item_Class ug_separtor_with_bottom_line_itc;
- Elm_Genlist_Item_Class ug_normalitc;
- Elm_Genlist_Item_Class ug_editfileditc;
- Elm_Genlist_Item_Class ug_editfiledUpperSeperatoritc;
- Elm_Genlist_Item_Class ug_editfiledBottomSeperatoritc;
- Elm_Genlist_Item_Class ug_newfolderitec;
- Elm_Genlist_Item_Class ug_pathinfoitec;
-#ifdef UG_THUMB_REAL_TIME_UPDATE
- Ecore_Timer *ug_pThumbUpdateTimer;
-#endif
- Evas_Object *ug_pRadioGroup;
- mf_search_handle search_handler;
-
- Eina_List *search_result_list;
- Ecore_Idler *search_idler;
- Ecore_Idler *popup_del_idler;
- Ecore_Idler *popup_create_idler;
- Ecore_Idler *msg_finish_idler;
- Ecore_Timer *pPopupTimer;
- Ecore_Timer *play_timer;
+ GString *ug_pPath;
+ char *ug_launch_path; /*myfile launch view path*/
+ int ug_launch_view;
+ int ug_iState;
+ int ug_iSortType;
+ int ug_iRadioOn;
+ int ug_iMmcFlag;
+ int ug_iCtrlBarType;
+ int ug_iRadioValue; /** current the radio box selected item value **/
+ int ug_iSelectedSortType;
+ int ug_iMore;
+ int ug_iCheckedCount;
+ int ug_iTotalCount;
+ int ug_iViewType;
+ Eina_Bool flagSearchStart;
+
+ bool ug_bInstallFlag;
+ bool ug_bNoContentFlag;
+ bool ug_bCancelDisableFlag;
+ Eina_Bool ug_bSelectAllChecked;
+ int ug_iThemeType;
+ char *ug_pUpper_folder;
+ char *ug_pEntryPath; /*the current ringtone file path*/
+ char *monitor_path;
+ char *mark_mode;
+ Eina_Bool ug_bDisableSelectAll;
+
+ Elm_Genlist_Item_Class ug_1text3icon_itc;
+ Elm_Genlist_Item_Class ug_1text2icon4_itc;
+ Elm_Genlist_Item_Class ug_1text2icon_itc;
+ Elm_Genlist_Item_Class ug_1text1icon_itc;
+ Evas_Object *ug_pRadioGroup;
+ mf_search_handle search_handler;
+
+ Eina_List *search_result_list;
+ Ecore_Idler *search_idler;
+ Ecore_Idler *popup_del_idler;
+ Ecore_Idler *popup_create_idler;
+ Ecore_Idler *msg_finish_idler;
+ Ecore_Timer *pSearchTimer;
+ Ecore_Timer *play_timer;
+
};
+typedef enum __mf_ug_sound_mode_e mf_ug_sound_mode_e;
+enum __mf_ug_sound_mode_e {
+ mf_ug_sound_mode_none,
+ mf_ug_sound_mode_ringtone,
+ mf_ug_sound_mode_alert
+};
typedef struct _ugUiGadget ugUiGadget;
struct _ugUiGadget {
- int ug_iFilterMode;
- int ug_iSelectMode;
- int ug_iMarkedMode;
- int ug_iDrmFilterMode;
- int ug_iImportMode;
+ int ug_iFilterMode;
+ int ug_iSelectMode;
+ int ug_iMarkedMode;
+ int ug_iImportMode;
+ int ug_iSoundMode;
#ifdef UG_OPERATION_SELECT_MODE
- int ug_bOperationSelectFlag;
+ int ug_bOperationSelectFlag;
#endif
- unsigned long ug_iFileFilter;
- int ug_iDrmFilter;
- char *ug_pExtension;
- Eina_List *ug_pDirList;
- Eina_List *ug_pFilterList;
- Eina_List *ug_pMultiSelectFileList;
- Ecore_Pipe *ug_pInotifyPipe;
- Ecore_Pipe *ug_pSyncPipe;
+ unsigned long ug_iFileFilter;
+ int ug_iMaxLength;
+ Eina_Bool ug_MaxSetFlag;
+ char *ug_pExtension;
+ char *default_ringtone;
+ char *title;
+ char *domain;
+ char *position;
+
+ Eina_Bool silent;
+ Eina_List *ug_pSearchFileList;
+ Eina_List *ug_pDirList;
+ Eina_List *ug_pFilterList;
+ Eina_List *ug_pMultiSelectFileList;
+ Ecore_Pipe *ug_pInotifyPipe;
+ Ecore_Pipe *ug_pSyncPipe;
};
-typedef struct _ugDrmInfo ugDrmInfo;
-struct _ugDrmInfo {
- int version;
- int constraint_type;
- char validity[DRM_MESSAGE_LEN];
- char description[DRM_MESSAGE_LEN];
- bool forward;
-};
-
-
typedef struct _ugListPlay ugListPlay;
struct _ugListPlay {
- char *ug_pPlayFilePath;
- player_h ug_Player;
- int ug_iPlayState;
- bool ug_bDrmContentCanPlay;
- bool ug_bDrmconsumption;
- ugDrmInfo ug_DrmInfo;
- Ecore_Idler *playing_err_idler;
+ char *ug_pPlayFilePath;
+ player_h ug_Player;
+ int ug_iPlayState;
+ Elm_Object_Item *play_data;
+ bool hiden_flag;
+ Ecore_Idler *playing_err_idler;
};
typedef struct _ugData ugData;
struct _ugData {
- ugMainWindow ug_MainWindow;
- ugStatus ug_Status;
- ugUiGadget ug_UiGadget;
- ugListPlay ug_ListPlay;
- ui_gadget_h ug;
- Ecore_Event_Handler *key_event_handler;
+ ugMainWindow ug_MainWindow;
+ ugStatus ug_Status;
+ ugUiGadget ug_UiGadget;
+ ugListPlay ug_ListPlay;
+ ui_gadget_h ug;
+
+ long long int limitsize;
+ long long int selsize;
+
+ Evas_Object *genlist;
+ Ecore_Idler *show;
};
+
Evas_Object *mf_ug_main_tab_layout_create(Evas_Object *parent);
Evas_Object *mf_ug_main_create_bg(Evas_Object *win);
-
+ugData * mf_ug_ugdata();
+void mf_ug_main_update_ctrl_in_idle(void *data);
+bool mf_ug_main_is_background();
#endif /* __DEF_MYFILE_H_ */
diff --git a/src/include/mf-ug-media-db.h b/src/include/mf-ug-media-db.h
new file mode 100644
index 0000000..4ffb59f
--- /dev/null
+++ b/src/include/mf-ug-media-db.h
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_MEDIA_DB_H__
+#define __MF_UG_MEDIA_DB_H__
+
+#include "mf-ug-media-types.h"
+#include "mf-ug-media-error.h"
+#include <sqlite3.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+int mf_ug_connect_db_with_handle(sqlite3 **db_handle);
+int mf_ug_disconnect_db_with_handle(sqlite3 *db_handle);
+
+//1 Shortcut
+int mf_ug_update_shortcut(MFDHandle *mfd_handle,const char *new_name, char *old_name);
+int mf_ug_insert_shortcut(MFDHandle *mfd_handle, const char *shortcut_path, const char *shortcut_name, int storage_type);
+int mf_ug_delete_shortcut(MFDHandle *mfd_handle, const char *shortcut_path);
+int mf_ug_delete_shortcut_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_foreach_shortcut_list(MFDHandle *mfd_handle, mf_shortcut_item_cb callback, void *user_data);
+int mf_ug_get_short_count(MFDHandle *mfd_handle, int *count);
+
+//1 Recent files
+int mf_ug_insert_recent_file(MFDHandle *mfd_handle, const char *path, const char *name, int storage_type, const char *thumbnail_path);
+int mf_ug_delete_recent_files(MFDHandle *mfd_handle, const char *path);
+int mf_ug_delete_recent_files_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_update_recent_files_thumbnail(MFDHandle *mfd_handle, const char *thumbnail, const char *new_thumbnail);
+int mf_ug_foreach_recent_files_list(MFDHandle *mfd_handle, mf_recent_files_item_cb callback, void *user_data);
+int mf_ug_get_recent_files_count(MFDHandle *mfd_handle, int *count);
+
+//1 Ringtone
+int mf_ug_update_ringtone(MFDHandle *mfd_handle,const char *new_name, char *old_name);
+int mf_ug_insert_ringtone(MFDHandle *mfd_handle, const char *ringtone_path, const char *ringtone_name, int storage_type);
+int mf_ug_delete_ringtone(MFDHandle *mfd_handle, const char *ringtone_path);
+int mf_ug_delete_ringtone_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_foreach_ringtone_list(MFDHandle *mfd_handle, mf_ringtone_item_cb callback, void *user_data);
+int mf_ug_get_ringtone_count(MFDHandle *mfd_handle, int *count);
+int mf_ug_find_ringtone(MFDHandle *mfd_handle, const char *ringtone_path);
+
+//1 Alerts
+int mf_ug_update_alert(MFDHandle *mfd_handle,const char *new_name, char *old_name);
+int mf_ug_insert_alert(MFDHandle *mfd_handle, const char *alert_path, const char *alert_name, int storage_type);
+int mf_ug_delete_alert(MFDHandle *mfd_handle, const char *alert_path);
+int mf_ug_delete_alert_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_foreach_alert_list(MFDHandle *mfd_handle, mf_ringtone_item_cb callback, void *user_data);
+int mf_ug_get_alert_count(MFDHandle *mfd_handle, int *count);
+int mf_ug_find_alert(MFDHandle *mfd_handle, const char *alert_path);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#endif /*_GALLERY_MEDIA_DB_H_*/
+
+
diff --git a/src/include/mf-ug-media-error.h b/src/include/mf-ug-media-error.h
new file mode 100644
index 0000000..4240e99
--- /dev/null
+++ b/src/include/mf-ug-media-error.h
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_MEDIA_ERROR_H_DEF__
+#define __MF_UG_MEDIA_ERROR_H_DEF__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+//Error types definition
+#define MFD_ERROR_NONE 0 /**< base */
+#define MFD_ERROR_INVALID_PARAMETER -1 /**< invalid parameter(s) */
+#define MFD_ERROR_INVALID_MEDIA -2 /**< invalid or unknown media */
+#define MFD_ERROR_FILE_NOT_EXSITED -3 /**< file doesn't exist */
+#define MFD_ERROR_DIR_NOT_EXSITED -4 /**< folder doesn't exist */
+#define MFD_ERROR_FILE_EXSITED -5 /**< file doesn't exist */
+
+
+#define MFD_ERROR_DB_CONNECT -201 /**< connect DB error */
+#define MFD_ERROR_DB_DISCONNECT -202 /**< disconnect DB error */
+#define MFD_ERROR_DB_CREATE_TABLE -203 /**< create table error */
+#define MFD_ERROR_DB_NO_RECORD -204 /**< No record */
+#define MFD_ERROR_DB_INTERNAL -206 /**< internal db error */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /*__MF_MEDIA_ERROR_H_DEF__*/
+
+
+
diff --git a/src/include/mf-ug-media-types.h b/src/include/mf-ug-media-types.h
new file mode 100644
index 0000000..3621a76
--- /dev/null
+++ b/src/include/mf-ug-media-types.h
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_MEDIA_TYPES_H_DEF__
+#define __MF_UG_MEDIA_TYPES_H_DEF__
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+typedef void MFDHandle; /**< Handle */
+
+/**
+ *@enum GM_CONTENT_TYPE
+ * Enumerations of GM_CONTENT_TYPE
+ */
+
+#if 1
+//1 Shortcut
+typedef struct _MFSitem
+{
+ char *path;
+ char *name;
+}MFSitem;
+
+typedef struct _MFRitem
+{
+ char *path;
+ char *name;
+ int storyage_type;
+ char *thumbnail;
+}MFRitem;
+
+typedef struct _mfRingtone
+{
+ char *path;
+ char *name;
+}mfRingtone;
+
+
+typedef bool (*mf_shortcut_item_cb)(MFSitem *Sitem, void *user_data);
+typedef bool (*mf_recent_files_item_cb)(MFRitem *Ritem, void *user_data);
+typedef bool (*mf_ringtone_item_cb)(mfRingtone *Ritem, void *user_data);
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /*__MF_UG_MEDIA_TYPES_H_DEF__*/
+
+
diff --git a/src/include/mf-ug-media.h b/src/include/mf-ug-media.h
new file mode 100644
index 0000000..c346f6b
--- /dev/null
+++ b/src/include/mf-ug-media.h
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_MEDIA_H_
+#define __MF_UG_MEDIA_H_
+
+#include "mf-ug-media-types.h"
+#include "mf-ug-media-error.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+int mf_ug_media_connect(MFDHandle **handle);
+int mf_ug_media_disconnect(MFDHandle *handle);
+int mf_ug_media_add_shortcut(MFDHandle *mfd_handle, const char *shortcut_path, const char *shortcut_name, int storage_type);
+int mf_ug_media_delete_shortcut(MFDHandle *mfd_handle, const char *path);
+int mf_ug_media_delete_shortcut_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_media_add_recent_files(MFDHandle *mfd_handle, const char *path, const char *name, int storage_type, const char *thumbnail_path);
+int mf_ug_media_delete_recent_files(MFDHandle *mfd_handle, const char *path);
+int mf_ug_media_delete_recent_files_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_media_update_recent_files_thumbnail(MFDHandle *mfd_handle, const char *thumbnail, const char *new_thumbnail);
+int mf_ug_media_foreach_shortcut_list(MFDHandle *mfd_handle, mf_shortcut_item_cb callback, void *user_data);
+int mf_ug_media_foreach_recent_files_list(MFDHandle *mfd_handle, mf_recent_files_item_cb callback, void *user_data);
+int mf_ug_media_get_short_count(MFDHandle *mfd_handle, int *count);
+int mf_ug_media_get_recent_files_count(MFDHandle *mfd_handle, int *count);
+int mf_ug_destroy_shortcut_item(MFSitem *sitem);
+int mf_ug_destroy_recent_files_item(MFRitem *ritem);
+
+//1 Ringtone
+int mf_ug_media_add_ringtone(MFDHandle *mfd_handle, const char *ringtone_path,
+ const char *ringtone_name, int storage_type);
+int mf_ug_media_delete_ringtone(MFDHandle *mfd_handle, const char *path);
+int mf_ug_media_delete_ringtone_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_media_foreach_ringtone_list(MFDHandle *mfd_handle, mf_ringtone_item_cb callback, void *user_data);
+int mf_ug_media_get_ringtone_count(MFDHandle *mfd_handle, int *count);
+int mf_ug_destroy_ringtone_item(mfRingtone *ritem);
+
+//1 Alert
+int mf_ug_media_add_alert(MFDHandle *mfd_handle, const char *alert_path,
+ const char *alert_name, int storage_type);
+int mf_ug_media_delete_alert(MFDHandle *mfd_handle, const char *path);
+int mf_ug_media_delete_alert_by_type(MFDHandle *mfd_handle, int storage_type);
+int mf_ug_media_foreach_alert_list(MFDHandle *mfd_handle, mf_ringtone_item_cb callback, void *user_data);
+int mf_ug_media_get_alert_count(MFDHandle *mfd_handle, int *count);
+int mf_ug_destroy_alert_item(mfRingtone *ritem);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+#endif /*__MF_UG_MEDIA_H_*/
+
+
diff --git a/src/include/mf-ug-music.h b/src/include/mf-ug-music.h
new file mode 100644
index 0000000..c2c955f
--- /dev/null
+++ b/src/include/mf-ug-music.h
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_MUSIC_H_DEF__
+#define __MF_UG_MUSIC_H_DEF__
+
+void mf_ug_music_launch_cb(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_destory_music_ug();
+Eina_Bool mf_ug_is_music_ug_run();
+
+#endif
diff --git a/src/include/mf-ug-resource.h b/src/include/mf-ug-resource.h
index 2b39fe9..05eb66b 100644
--- a/src/include/mf-ug-resource.h
+++ b/src/include/mf-ug-resource.h
@@ -1,83 +1,77 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_RESOURCE_H_
#define __DEF_MF_UG_RESOURCE_H_
-#include "../../data/ug_edc_common.h"
#include "mf-ug-conf.h"
-/************* system strings ************/
-#define MF_UG_LABEL_UNSUPPORT_FILE_TYPE dgettext("sys_string", "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE")
-#define MF_UG_LABEL_CONNECT_FAILED dgettext("sys_string", "IDS_COM_POP_CONNECTION_FAILED")
-#define MF_UG_LABEL_PHONE dgettext("sys_string", "IDS_COM_BODY_PHONE")
-#define MF_UG_LABEL_SELECTED dgettext("sys_string", "IDS_COM_BODY_SELECTED")
-#define MF_UG_LABEL_MMC dgettext("sys_string", "IDS_COM_BODY_MEMORY_CARD")
-#define MF_UG_LABEL_UNKNOWN dgettext("sys_string", "IDS_COM_BODY_UNKNOWN")
-#define MF_UG_LABEL_SET dgettext("sys_string", "IDS_COM_SK_SET")
-#define MF_UG_LABEL_ATTACH dgettext("sys_string", "IDS_COM_POP_ATTACH")
-#define MF_UG_LABEL_CANCEL dgettext("sys_string", "IDS_COM_SK_CANCEL")
-#define MF_UG_LABEL_NO_FILES dgettext("sys_string", "IDS_COM_BODY_NO_FILES")
-#define MF_UG_LABEL_MYFILES dgettext("sys_string", "IDS_COM_BODY_MY_FILES")
-#define MF_UG_LABEL_OK dgettext("sys_string", "IDS_COM_SK_OK")
-#define MF_UG_LABEL_DATE dgettext("sys_string", "IDS_COM_POP_DATE")
-#define MF_UG_LABEL_SIZE dgettext("sys_string", "IDS_COM_POP_SIZE")
-#define MF_UG_LABEL_TYPE dgettext("sys_string", "IDS_COM_POP_TYPE")
-#define MF_UG_LABEL_NAME dgettext("sys_string", "IDS_COM_POP_NAME")
-#define MF_UG_LABEL_SEARCH dgettext("sys_string", "IDS_COM_BODY_SEARCH")
-#define MF_UG_LABEL_CANCEL dgettext("sys_string", "IDS_COM_SK_CANCEL")
-#define MF_UG_LABEL_NO_RESULT dgettext("sys_string", "IDS_COM_BODY_NO_SEARCH_RESULTS")
-#define MF_UG_LABEL_IMPORT dgettext("sys_string", "IDS_COM_OPT_IMPORT")
-#define MF_UG_LABEL_CREATE dgettext("sys_string", "IDS_COM_BODY_CREATE_FOLDER")
-#define MF_UG_LABEL_NOT_ENOUGH_SPACE dgettext("sys_string", "IDS_COM_POP_NOT_ENOUGH_MEMORY")
-#define MF_UG_LABEL_FOLDER dgettext("sys_string", "IDS_COM_POP_FOLDER")
-#define MF_UG_LABEL_SAVE dgettext("sys_string", "IDS_COM_SK_SAVE")
-#define MF_UG_LABEL_YES dgettext("sys_string", "IDS_COM_SK_YES")
-#define MF_UG_LABEL_NO dgettext("sys_string", "IDS_COM_SK_NO")
-#define MF_UG_LABEL_SELECT_ALL dgettext("sys_string", "IDS_COM_BODY_SELECT_ALL")
-#define MF_UG_LABEL_MAX_CHARACTER_REACHED dgettext("sys_string", "IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED")
-#define MF_UG_LABEL_ALARM dgettext("sys_string", "IDS_COM_BODY_ALARM")
-#define MF_UG_LABEL_DONE dgettext("sys_string", "IDS_COM_POP_DONE")
-
-/************ myfile strings *************/
-#define MF_UG_LABEL_MEMORY_NOT_ENOUGH dgettext(UGPACKAGE, "IDS_MF_POP_NOT_ENOUGH_HEAP_MEMORY")
-#define MF_UG_LABEL_ASCENDING dgettext(UGPACKAGE, "IDS_MF_POP_ASCENDING")
-#define MF_UG_LABEL_DESCENDING dgettext(UGPACKAGE, "IDS_MF_POP_DESCENDING")
-#define MF_UG_LABEL_EXPORT dgettext(UGPACKAGE, "IDS_MF_BUTTON_EXPORT_HERE")
-#define MF_UG_LABEL_HOME dgettext(UGPACKAGE, "IDS_MF_BUTTON_HOME")
-#define MF_UG_LABEL_UPPER dgettext(UGPACKAGE, "IDS_MF_TAB_UP")
-#define MF_UG_LABEL_LIST_BY dgettext(UGPACKAGE, "IDS_MF_OPT_LIST_BY")
-#define MF_UG_LABEL_GO_TO_MYFILES dgettext(UGPACKAGE, "IDS_MF_BUTTON_GO_TO_MY_FILES")
-#define MF_UG_LABEL_RINGTONES dgettext(UGPACKAGE, "IDS_MF_BODY_RINGTONES")
-#define MF_UG_LABEL_DRM_UNABLE_SET dgettext(UGPACKAGE, "IDS_MF_POP_UNABLE_TO_SET_DRM_PROTECTED_CONTENT_AS_RINGTONE_OR_NOTIFICATION_ALERT")
-
-/************no design id **************/
-#define MF_UG_LABEL_OTHER_MUSIC "Other music"
-#define MF_UG_LABEL_UNABLE_TO_PLAY_DURING_CALL "Unable to play during call"
-#define MF_UG_LABEL_UNABLE_TO_PLAY_ERROR_OCCURRED "Unable to play. Error occurred"
-#define MF_UG_LABEL_SAVE_HERE "Set here"
-#define MF_UG_LABEL_GET_NAME_FAILED "Get name failed. try again!"
-#define MF_UG_LABEL_NAME_INVALID ("Invalid name, retry!")
-#define MF_UG_LABEL_ILLEGAL_CHAR "Name contains illegal character, Retry!"
-#define MF_UG_LABEL_PATH_REACH_MAX_LEN "Full path length should be less than 4096,Retry!"
-#define MF_UG_LABEL_DUP_NAME "Duplicated name, retry!"
-#define MF_UG_LABEL_OPER_READ_ONLY "Operation failed: Read Only Area"
-#define MF_UG_LABEL_CREATE_DIR_FAILED "Create Directory failed"
-#define MF_UG_LABEL_EMPTY_FOLDER_NAME "Folder name can't be empty, Retry!"
-#define MF_UG_LABEL_NO_MEM_CARD "No memory card inserted"
+#define MF_UG_LABEL_PHONE "IDS_MF_BODY_DEVICE_MEMORY_ABB"
+#define MF_UG_LABEL_SELECTED "IDS_COM_BODY_PD_SELECTED"
+#define MF_UG_LABEL_MMC "IDS_MF_BODY_SD_CARD_ABB"
+#define MF_UG_LABEL_NO_FILES "IDS_COM_BODY_NO_FILES"
+#define MF_UG_LABEL_MYFILES "IDS_COM_BODY_MY_FILES"
+#define MF_UG_LABEL_OK "IDS_COM_SK_OK"
+#define MF_UG_LABEL_NO_RESULT "IDS_COM_BODY_NO_ITEMS"
+#define MF_UG_LABEL_DONE "IDS_COM_SK_DONE"
+#define MF_UG_LABEL_CANCEL "IDS_COM_SK_CANCEL"
+#define MF_UG_LABEL_DELETE "IDS_COM_BODY_DELETE"
+#define MF_UG_LABEL_UNSUPPORT_FILE_TYPE "IDS_COM_BODY_UNSUPPORTED_FILE_TYPE"
+#define MF_UG_LABEL_SELECT_ALL "IDS_COM_BODY_SELECT_ALL"
+#define MF_UG_LABEL_YES "IDS_COM_SK_YES"
+#define MF_UG_LABEL_NO "IDS_COM_SK_NO"
+#define MF_UG_LABEL_BACK "IDS_COM_SK_BACK"
+#define MF_UG_LABEL_ADD "IDS_COM_SK_ADD"
+#define MF_UG_LABEL_DELETE "IDS_COM_BODY_DELETE"
+#define MF_UG_LABEL_FAILED "IDS_COM_POP_FAILED"
+#define MF_UG_LABEL_SUCCESS "IDS_COM_POP_SUCCESS"
+#define MF_UG_LABEL_FAILED "IDS_COM_POP_FAILED"
+#define MF_UG_BUTTON_LABEL_DEL "IDS_MF_POP_DELETE_Q"
+#define MF_UG_LABEL_ADD_FAILED "IDS_MUSIC_POP_UNABLE_TO_ADD_SOME_ITEMS_DONT_EXIST"
+#define MF_UG_POP_TITLE_OPERATION_ERROR "IDS_COM_BODY_OPERATION_FAILED"
+#define MF_UG_LABEL_UNABLE_TO_PLAY_DURING_CALL "IDS_MF_POP_UNABLE_TO_PLAY_DURING_CALL"
+#define MF_UG_LABEL_UNABLE_TO_PLAY_ERROR_OCCURRED "IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"
+#define MF_UG_LABEL_GET_NAME_FAILED "IDS_MF_POP_INVALID_FILE_NAME"
+#define MF_UG_LABEL_NAME_INVALID "IDS_MF_POP_INVALID_FILE_NAME"
+#define MF_UG_LABEL_ILLEGAL_CHAR "IDS_VR_POP_INVALID_CHARACTER_ENTERED_TRY_AGAIN"
+#define MF_UG_LABEL_DUP_NAME "IDS_COM_POP_ALREDY_EXISTS"
+#define MF_UG_LABEL_OPER_READ_ONLY "Operation failed: Read Only Area"
+#define MF_UG_LABEL_CREATE_DIR_FAILED "IDS_COM_POP_FAILED"
+#define MF_UG_LABEL_EMPTY_FOLDER_NAME "IDS_MF_POP_ERR_FOLDER_NAME_EMPTY"
+#define MF_UG_LABEL_DEFAULT_RINGTONE "IDS_MF_OPT_DEFAULT_RINGTONE"
+#define MF_UG_LABEL_MAX_CHARACTER_REACHED "IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED"
+#define MF_UG_LABEL_CREATE "IDS_COM_BODY_CREATE_FOLDER"
+#define MF_UG_LABEL_SILENT "IDS_ST_BODY_PHONEPROFILES_SILENT"
+#define MF_UG_LABEL_NOT_ENOUGH_SPACE "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+#define MF_UG_LABEL_FOLDER "IDS_COM_POP_FOLDER"
+#define MF_UG_LABEL_CONNECT_FAILED "IDS_COM_POP_CONNECTION_FAILED"
+#define MF_UG_LABEL_IMPORT_CHAP "IDS_COM_OPT_IMPORT"
+#define MF_UG_LABEL_DOCUMENTS "IDS_MF_BODY_DOCUMENTS"
+#define MF_UG_LABEL_SELECT_ITEMS "IDS_MF_HEADER_SELECT_ITEMS"
+#define MF_UG_LABEL_PROCESSING "IDS_COM_POP_PROCESSING"
+#define MF_UG_LABEL_SEARCH "IDS_COM_BODY_SEARCH"
+#define MF_UG_LABEL_DEFAULT_NOTIFICATION_SOUND "IDS_ST_BODY_DEFAULT_NOTIFICATION_SOUND_ABB"
+#define MF_UG_LABEL_REACH_MAX_SHARE_COUNT "IDS_IV_POP_YOU_CAN_SELECT_UP_TO_PD_ITEMS"
+#define MF_UG_LABEL_DONE_CAP "IDS_TPLATFORM_ACBUTTON_DONE_ABB"
+#define MF_UG_LABEL_CANCEL_CAP "IDS_TPLATFORM_ACBUTTON_CANCEL_ABB"
+#define MF_UG_LABEL_MAXIMUM_SIZE "IDS_IM_POP_MAXIMUM_SIZE_OF_FILES_EXCEEDED"
#endif
diff --git a/src/include/mf-ug-ringtone-view.h b/src/include/mf-ug-ringtone-view.h
new file mode 100644
index 0000000..0c9ed5c
--- /dev/null
+++ b/src/include/mf-ug-ringtone-view.h
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_RINGTONE_VIEW_H_DEF__
+#define __MF_UG_RINGTONE_VIEW_H_DEF__
+
+void mf_ug_create_rintone_view(void *data);
+bool mf_ug_ringtone_is_default(int mode, const char *path);
+void mf_ug_ringtone_list_resume(void *data);
+
+Evas_Object *mf_ug_ringtone_list_create(void *data);
+
+#endif
diff --git a/src/include/mf-ug-search-internal.h b/src/include/mf-ug-search-internal.h
index c3a6aa3..fd9d4d5 100644
--- a/src/include/mf-ug-search-internal.h
+++ b/src/include/mf-ug-search-internal.h
@@ -1,18 +1,24 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 _MF_SEARCH_INTERNAL_H_
#define _MF_SEARCH_INTERNAL_H_
@@ -52,8 +58,14 @@
**/
int _mf_ug_search_init(ms_handle_t **handle);
-int _mf_ug_search_start(ms_handle_t *handle, const char **root_path, unsigned int path_num, const char *needle, mf_search_option option,
- void *user_data);
+int _mf_ug_search_start(ms_handle_t *handle,
+ const char **root_path,
+ unsigned int path_num,
+ const char *needle,
+ mf_search_option option,
+ void *user_data,
+ mf_search_filter_cb func,
+ int category);
int _mf_ug_search_stop(ms_handle_t *handle);
void _mf_ug_search_finalize(ms_handle_t **handle);
diff --git a/src/include/mf-ug-search.h b/src/include/mf-ug-search.h
index 037fef9..6584c8d 100644
--- a/src/include/mf-ug-search.h
+++ b/src/include/mf-ug-search.h
@@ -1,18 +1,24 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 _MF_SEARCH_H_
#define _MF_SEARCH_H_
@@ -29,73 +35,90 @@ typedef unsigned int mf_search_handle;
**/
typedef unsigned int mf_search_result;
+typedef int (*mf_search_filter_cb) (const char *);
+
+
/**
* Enumerations of search option
**/
+typedef enum _mf_search_category_type mf_search_category_type;
+enum _mf_search_category_type {
+ MF_SEARCH_CATEGORY_NONE = 0,
+ MF_SEARCH_CATEGORY_SOUND,
+ MF_SEARCH_CATEGORY_VIDEO,
+ MF_SEARCH_CATEGORY_IMAGE,
+ MF_SEARCH_CATEGORY_DOCUMENT,
+ MF_SEARCH_CATEGORY_OTHERS,
+ MF_SEARCH_CATEGORY_MAX,
+};
+
typedef enum _mf_search_option mf_search_option;
enum _mf_search_option {
- MF_SEARCH_OPT_NONE = (1 << 0),
- MF_SEARCH_OPT_HIDDEN = (1 << 1),
- MF_SEARCH_OPT_DIR = (1 << 2),
- MF_SEARCH_OPT_FILE = (1 << 3),
- MF_SEARCH_OPT_EXT = (1 << 4),
+ MF_SEARCH_OPT_NONE = (1 << 0),
+ MF_SEARCH_OPT_HIDDEN = (1 << 1),
+ MF_SEARCH_OPT_DIR = (1 << 2),
+ MF_SEARCH_OPT_FILE = (1 << 3),
+ MF_SEARCH_OPT_EXT = (1 << 4),
+ MF_SEARCH_OPT_MULTI_EXT = (1 << 5)
};
typedef enum _mf_search_pipe_msg_type mf_search_pipe_msg_type;
enum _mf_search_pipe_msg_type {
- MF_SEARCH_PIPE_MSG_NONE = 0,
- MF_SEARCH_PIPE_MSG_ROOT_CHANGE,
- MF_SEARCH_PIPE_MSG_RESULT_REPORT,
- MF_SEARCH_PIPE_MSG_FINISHED,
- MF_SEARCH_PIPE_MSG_MAX,
+ MF_SEARCH_PIPE_MSG_NONE = 0,
+ MF_SEARCH_PIPE_MSG_ROOT_CHANGE,
+ MF_SEARCH_PIPE_MSG_RESULT_REPORT,
+ MF_SEARCH_PIPE_MSG_FINISHED,
+ MF_SEARCH_PIPE_MSG_MAX,
};
typedef enum _mf_search_state mf_search_state;
enum _mf_search_state {
- MF_SEARCH_STATE_NONE = 0,
- MF_SEARCH_STATE_INIT,
- MF_SEARCH_STATE_SEARCH,
- MF_SEARCH_STATE_MAX,
+ MF_SEARCH_STATE_NONE = 0,
+ MF_SEARCH_STATE_INIT,
+ MF_SEARCH_STATE_SEARCH,
+ MF_SEARCH_STATE_MAX,
};
typedef struct _mf_search_result_t mf_search_result_t;
struct _mf_search_result_t {
- GList *dir_list;
- GList *file_list;
- gchar *current_dir;
- guint total_count;
- gboolean is_end;
+ GList *dir_list;
+ GList *file_list;
+ gchar *current_dir;
+ guint total_count;
+ gboolean is_end;
};
typedef struct _ms_args_t ms_args_t;
struct _ms_args_t {
- GList *root_path;
- gchar *needle;
- mf_search_option option;
- void *user_data;
+ GList *root_path;
+ gchar *needle;
+ mf_search_option option;
+ void *user_data;
+ mf_search_filter_cb func;
+ int category;
} ;
typedef struct _ms_handle_t ms_handle_t;
struct _ms_handle_t {
- mf_search_state state;
- GMutex *cmd_lock;
- ms_args_t *args;
-
- GThread *thread_h;
- GMutex *thread_mutex;
- /* critical section */
- gboolean is_stop;
- mf_search_result_t *result;
- /* critical section */
+ mf_search_state state;
+ GMutex cmd_lock;
+ ms_args_t *args;
+
+ GThread *thread_h;
+ GMutex thread_mutex;
+ /* critical section */
+ gboolean is_stop;
+ mf_search_result_t *result;
+ /* critical section */
};
typedef struct _mf_search_pipe_msg mf_search_pipe_msg;
struct _mf_search_pipe_msg {
- mf_search_pipe_msg_type mf_sp_msg_type;
- void *report_result;
- gchar *current_path;
+ mf_search_pipe_msg_type mf_sp_msg_type;
+ void *report_result;
+ gchar *current_path;
};
/**
@@ -108,12 +131,12 @@ typedef void (*mf_Search_Cb) (mf_search_pipe_msg_type type, mf_search_result res
/**
* Definition of error code
**/
-#define MF_SEARCH_ERROR_NONE (0)
-#define MF_SEARCH_ERROR_INTERNAL (-(1)) /* Internal error */
-#define MF_SEARCH_ERROR_INVAL_P (-(2)) /* Invalid params */
-#define MF_SEARCH_ERROR_INVAL_S (-(3)) /* Invalid status */
-#define MF_SEARCH_ERROR_ALLOC (-(4)) /* Memory allocation failed */
-#define MF_SEARCH_ERROR_FS (-(5)) /* File system error */
+#define MF_SEARCH_ERROR_NONE (0)
+#define MF_SEARCH_ERROR_INTERNAL (-(1)) /* Internal error */
+#define MF_SEARCH_ERROR_INVAL_P (-(2)) /* Invalid params */
+#define MF_SEARCH_ERROR_INVAL_S (-(3)) /* Invalid status */
+#define MF_SEARCH_ERROR_ALLOC (-(4)) /* Memory allocation failed */
+#define MF_SEARCH_ERROR_FS (-(5)) /* File system error */
/*+++++++++++++++++++++++ APIs +++++++++++++++++++++++*/
@@ -139,8 +162,14 @@ int mf_ug_search_init(mf_search_handle *handle);
* If success, #mf_search state is changed from MF_SEARCH_STATE_INIT to MF_SEARCH_STATE_SEARCH
* Return value: This function returns zero on success, or negative value.
**/
-int mf_ug_search_start(mf_search_handle handle, const char **root_path, unsigned int path_num, const char *needle, mf_search_option option,
- void *user_data);
+int mf_ug_search_start(mf_search_handle handle,
+ const char **root_path,
+ unsigned int path_num,
+ const char *needle,
+ mf_search_option option,
+ void *user_data,
+ mf_search_filter_cb func,
+ int category);
/**
* mf_ug_search_stop:
* @handle: the handle of mf_search
@@ -206,6 +235,4 @@ int mf_ug_search_result_is_end(mf_search_result_t *result, int *is_end);
**/
int mf_ug_search_result_total_count_get(mf_search_result_t *result, unsigned int *count);
-void mf_ug_search_view_item_append(void *data, void *user_data);
-
#endif
diff --git a/src/include/mf-ug-util.h b/src/include/mf-ug-util.h
index 91d258a..56636e5 100644
--- a/src/include/mf-ug-util.h
+++ b/src/include/mf-ug-util.h
@@ -1,18 +1,23 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_UTIL_H_
#define __DEF_MF_UG_UTIL_H_
@@ -22,234 +27,252 @@
#include <glib.h>
#include "mf-ug-main.h"
+#include "mf-ug-fs-util.h"
#define UG_SAFE_FREE_CHAR(x) do {\
- if ((x) != NULL) {\
- free(x); \
- x = NULL;\
- } \
- } while (0)
+ if ((x) != NULL) {\
+ free(x); \
+ x = NULL;\
+ } \
+ } while (0)
#define UG_SAFE_FREE_GSTRING(x) do {\
- if ((x) != NULL) {\
- g_string_free(x, TRUE); \
- x = NULL;\
- } \
- } while (0)
+ if ((x) != NULL) {\
+ g_string_free(x, TRUE); \
+ x = NULL;\
+ } \
+ } while (0)
#define UG_CHAR_CHECK_NULL_GOTO(arg, dest) do {\
- if ((arg) == NULL) {\
- goto dest;\
- } \
- } while (0)
+ if ((arg) == NULL) {\
+ goto dest;\
+ } \
+ } while (0)
#define UG_GSTRING_CHECK_NULL_GOTO(arg, dest) do {\
- if ((arg) == NULL || (arg->str) == NULL) {\
- goto dest;\
- } \
- } while (0)
+ if ((arg) == NULL || (arg->str) == NULL) {\
+ goto dest;\
+ } \
+ } while (0)
#define UG_SAFE_DEL_NAVI_ITEM(x) do {\
- if ((x) != NULL) {\
- elm_object_item_del(x); \
- x = NULL;\
- } \
- } while (0)
+ if ((*x) != NULL) {\
+ elm_object_item_del(*x); \
+ *x = NULL;\
+ } \
+ } while (0)
#define UG_SAFE_FREE_OBJ(x) do {\
- if ((x) != NULL) {\
- evas_object_del(x); \
- x = NULL;\
- } \
- } while (0)
+ if ((x) != NULL) {\
+ evas_object_del(x); \
+ x = NULL;\
+ } \
+ } while (0)
#define UG_SAFE_STRCPY(dest, src) \
- do{if(!dest||!src)break;\
- strncpy (dest , src, sizeof(dest)-1);\
- dest[sizeof(dest)-1] = 0; }while(0)
+ do { if (!dest || !src) break; \
+ strncpy (dest, src, sizeof(dest)-1); \
+ dest[sizeof(dest)-1] = 0; } while (0)
#define UG_SAFE_DEL_ECORE_TIMER(timer) do { \
- if (timer) { \
- ecore_timer_del(timer);\
- timer = NULL; \
- } \
- } while (0)
+ if (timer) { \
+ ecore_timer_del(timer);\
+ timer = NULL; \
+ } \
+ } while (0)
#define goto_if(x, dest) do { \
- if (x) {\
- goto dest;\
- }\
- } while (0)
+ if (x) {\
+ goto dest;\
+ }\
+ } while (0)
#define ug_ecore_idler_del(idler) do { \
- if(idler) { \
- ecore_idler_del(idler);\
- idler = NULL; \
- } \
- } while (0)
+ if (idler) { \
+ ecore_idler_del(idler);\
+ idler = NULL; \
+ } \
+ } while (0)
typedef enum _mf_ug_list_play_state mf_ug_list_play_state;
enum _mf_ug_list_play_state {
- PLAY_STATE_INIT = 0,
- PLAY_STATE_READY,
- PLAY_STATE_PLAYING,
- PLAY_STATE_PAUSED,
- PLAY_STATE_STOP,
- PLAY_STATE_MAX
+ PLAY_STATE_INIT = 0,
+ PLAY_STATE_READY,
+ PLAY_STATE_PLAYING,
+ PLAY_STATE_PAUSED,
+ PLAY_STATE_STOP,
+ PLAY_STATE_MAX
};
typedef enum _mf_ug_select_mode mf_ug_select_mode;
enum _mf_ug_select_mode {
- SELECT_MODE = 0,
- SINGLE_FILE_MODE,
- SINGLE_ALL_MODE,
- MULTI_FILE_MODE,
- MULTI_ALL_MODE,
- EXPORT_MODE,
- IMPORT_MODE,
- IMPORT_SINGLE,
- IMPORT_PATH_SELECT_MODE,
- SAVE_MODE,
- SELECT_MODE_MAX
-};
-
-typedef enum _mf_ug_drm_mode mf_ug_drm_mode;
-enum _mf_ug_drm_mode {
- DRM_FILTER_NONE = 0,
- DRM_FILTER_ALL,
- DRM_FILTER_WITHOUT_FL,
- DRM_FILTER_IMAGE,
- DRM_FILTER_RINGTONE,
- DRM_FILTER_MAX
+ SELECT_MODE = 0,
+ SINGLE_FILE_MODE,
+ SINGLE_ALL_MODE,
+ MULTI_FILE_MODE,
+ MULTI_ALL_MODE,
+ EXPORT_MODE,
+ IMPORT_MODE,
+ IMPORT_SINGLE,
+ IMPORT_PATH_SELECT_MODE,
+ DOCUMENT_SHARE,
+ SSM_DOCUMENT_SHARE,
+ SAVE_MODE,
+ SELECT_MODE_MAX
};
typedef enum _mf_ug_marked_switch mf_ug_marked_switch;
enum _mf_ug_marked_switch {
- MARKED_OFF = 0,
- MARKED_ON,
+ MARKED_OFF = 0,
+ MARKED_ON,
};
typedef enum _mf_ug_file_filter_type mf_ug_file_filter_type;
enum _mf_ug_file_filter_type {
- SHOW_ALL_LIST = 0,
- SHOW_IMAGE_LIST,
- SHOW_SOUND_LIST,
- SHOW_VIDEO_LIST,
- SHOW_FLASH_LIST,
- SHOW_FOLDER_LIST,
- SHOW_IMAGE_VIDEO_LIST,
- SHOW_IMAGE_SOUND_LIST,
- SHOW_VIDEO_SOUND_LIST,
- SHOW_BY_EXTENSION
+ SHOW_ALL_LIST = 0,
+ SHOW_IMAGE_LIST,
+ SHOW_SOUND_LIST,
+ SHOW_VIDEO_LIST,
+ SHOW_FLASH_LIST,
+ SHOW_FOLDER_LIST,
+ SHOW_IMAGE_VIDEO_LIST,
+ SHOW_IMAGE_SOUND_LIST,
+ SHOW_VIDEO_SOUND_LIST,
+ SHOW_DOCUMENT_LIST,
+ SHOW_BY_EXTENSION
};
typedef enum _mf_ug_state_mode mf_ug_state_mode;
enum _mf_ug_state_mode {
- STATE_PHONE = 0,
- STATE_MEMORY,
- STATE_MODE_MAX
+ STATE_PHONE = 0,
+ STATE_MEMORY,
+ STATE_MODE_MAX
};
typedef enum _mf_ug_mmc_insert_state mf_ug_mmc_insert_state;
enum _mf_ug_mmc_insert_state {
- MMC_OFF = 0,
- MMC_ON
+ MMC_OFF = 0,
+ MMC_ON
};
typedef enum _mf_ug_launch_type mf_ug_launch_type;
enum _mf_ug_launch_type {
- LAUNCH_TYPE_FORK = 0,
- LAUNCH_TYPE_FAIL,
- LAUNCH_TYPE_DIR,
- LAUNCH_TYPE_IMAGE,
- LAUNCH_TYPE_MUSIC,
- LAUNCH_TYPE_VIDEO,
- LAUNCH_TYPE_UNSUPPORT,
- LAUNCH_TYPE_MAX
+ LAUNCH_TYPE_FORK = 0,
+ LAUNCH_TYPE_FAIL,
+ LAUNCH_TYPE_DIR,
+ LAUNCH_TYPE_IMAGE,
+ LAUNCH_TYPE_MUSIC,
+ LAUNCH_TYPE_VIDEO,
+ LAUNCH_TYPE_UNSUPPORT,
+ LAUNCH_TYPE_MAX
};
typedef enum _mf_ug_eina_list_node_type mf_ug_eina_list_node_type;
enum _mf_ug_eina_list_node_type {
- NODE_TYPE_NONE = 0,
- NODE_TYPE_CHAR,
- NODE_TYPE_PNODE,
- NODE_TYPE_GSTRING,
- NODE_TYPE_MAX
+ NODE_TYPE_NONE = 0,
+ NODE_TYPE_CHAR,
+ NODE_TYPE_PNODE,
+ NODE_TYPE_GSTRING,
+ NODE_TYPE_MAX
};
typedef enum _mf_ug_ctrl_bar_type mf_ug_ctrl_bar_type;
enum _mf_ug_ctrl_bar_type {
- CTRL_BAR_NORMAL = 0,
- CTRL_BAR_MUSIC,
- CTRL_BAR_RINGTONE,
- CTRL_BAR_MULTI,
- CTR_BAR_MAX
+ CTRL_BAR_NORMAL = 0,
+ CTRL_BAR_MUSIC,
+ CTRL_BAR_RINGTONE,
+ CTRL_BAR_MULTI,
+ CTR_BAR_MAX
};
typedef enum _mf_ug_view_type mf_ug_view_type;
enum _mf_ug_view_type {
- mf_ug_view_root = 0,
- mf_ug_view_normal,
- mf_ug_view_max
+ mf_ug_view_root = 0,
+ mf_ug_view_normal,
+ mf_ug_view_ringtone_del,
+ mf_ug_view_max
};
+#define INHERIT_MF_LIST \
+ int list_type;\
+ int ug_iGroupValue;\
+ int storage_type;\
+ ugData *ug_pData;
+
+typedef struct __mf_list_data_t{
+ INHERIT_MF_LIST
+}mf_list_data_t;
+
+
typedef struct _ugListItemData ugListItemData;
struct _ugListItemData {
- Evas_Object *ug_pCheckBox;
- Evas_Object *ug_pRadioBox;
- Evas_Object *ug_pPlaybtn;
- Elm_Object_Item *ug_pItem;
- char *ug_pThumbPath;
- GString *ug_pItemName;
- ugData *ug_pData;
- bool ug_bChecked;
- int ug_iGroupValue;
- bool ug_bRealThumbFlag;
+ INHERIT_MF_LIST
+ Evas_Object *ug_pCheckBox;
+ Evas_Object *ug_pRadioBox;
+ Evas_Object *ug_pPlaybtn;
+ Elm_Object_Item *ug_pItem;
+ char *ug_pThumbPath;
+ GString *ug_pItemName;
+ bool ug_bChecked;
+ bool ug_bRealThumbFlag;
+ Eina_Bool thumbnail_create;
+ media_info_h media;
+ char *sound_title;
+ bool ug_bDefaultItem;
+ double selsize;
};
typedef struct _ug_dir_event_t ug_dir_event_t;
struct _ug_dir_event_t {
- int event;
- char *name;
+ int event;
+ char *name;
};
-typedef enum _mf_ug_theme_type mf_ug_theme_type;
+typedef enum _mf_ug_theme_type mf_ug_theme_type;
enum _mf_ug_theme_type {
- UG_THEME_INVALID = -1,
- UG_THEME_NBEAT = 0,
- UG_THEME_NBEAT_BLACK = 1,
- UG_THEME_ERROR
+ UG_THEME_INVALID = -1,
+ UG_THEME_NBEAT = 0,
+ UG_THEME_NBEAT_BLACK = 1,
+ UG_THEME_ERROR
};
-typedef enum _mf_ug_more_type_e mf_ug_more_type_e;
+typedef enum _mf_ug_more_type_e mf_ug_more_type_e;
-enum _mf_ug_more_type_e{ /* softkey / contextual popup */
- UG_MORE_DEFAULT = 0,
- UG_MORE_CREATE_FOLDER,
- UG_MORE_SEARCH,
- UG_MORE_TYPE_MAX
+enum _mf_ug_more_type_e{ /* softkey / contextual popup */
+ UG_MORE_DEFAULT = 0,
+ UG_MORE_CREATE_FOLDER,
+ UG_MORE_SEARCH,
+ UG_MORE_TYPE_MAX
};
typedef enum _mf_ug_file_name_type_e mf_ug_file_name_type_e;
enum _mf_ug_file_name_type_e {
- FILE_NAME_WITH_BRACKETS,
- FILE_NAME_WITH_UNDERLINE,
- FILE_NAME_NONE,
+ FILE_NAME_WITH_BRACKETS,
+ FILE_NAME_WITH_UNDERLINE,
+ FILE_NAME_NONE,
};
typedef enum __mf_ug_thumbnail_type_e mf_ug_thumbnail_type_e;
enum __mf_ug_thumbnail_type_e {
- MF_UG_THUMBNAIL_TYPE_DEFAULT,
- MF_UG_THUMBNAIL_TYPE_THUMBNAIL,
- MF_UG_THUMBNAIL_TYPE_MAX
+ MF_UG_THUMBNAIL_TYPE_DEFAULT,
+ MF_UG_THUMBNAIL_TYPE_THUMBNAIL,
+ MF_UG_THUMBNAIL_TYPE_MAX
};
+
+typedef struct __mf_ug_view_node_s mf_ug_view_node_s;
+struct __mf_ug_view_node_s {
+ int view_type;
+ char *path;
+};
+
+
bool mf_ug_util_is_mass_storage_on();
int mf_ug_util_create_dir_monitor(void *data);
int mf_ug_util_set_mmc_state_cb(void *data);
@@ -261,6 +284,7 @@ void mf_ug_list_play_play_music_item(ugListItemData *data);
void mf_ug_list_play_destory_playing_file(void *data);
void mf_ug_list_play_update_item_icon(void *data);
+
void mf_ug_util_storage_insert_action(void *data, char *pItemLabel);
void mf_ug_util_destory_mmc_state_cb();
void mf_ug_util_destory_dir_monitor(void *data);
@@ -271,7 +295,6 @@ int mf_ug_util_add_dir_watch(const char *path, void *data);
mf_ug_launch_type mf_ug_util_get_file_launch_type(char *path);
void mf_ug_util_destory_mass_storage_callback();
-mf_ug_theme_type mf_ug_util_get_theme(void);
int mf_ug_file_attr_get_parent_path(const char *path, char **parent_path);
char *mf_ug_util_upper_folder_name_get(void *data, GString *fullpath);
void mf_ug_util_operation_alloc_failed(void *data);
@@ -279,5 +302,26 @@ int mf_ug_util_remove_dir_watch(void);
void mf_ug_util_sort_the_file_list(void *data);
int mf_ug_util_check_disk_space(void *data);
long mf_ug_util_character_count_get(const char *original);
+int mf_ug_util_generate_root_view_file_list(Eina_List **list, int storage_state);
+int mf_ug_util_set_default_ringtone_cb(void *data);
+void mf_ug_util_destory_default_ringtone_cb();
+bool mf_ug_util_is_unique_view(int mode);
+bool mf_ug_util_is_multi_select_mode(int mode);
+bool mf_ug_util_is_single_select_mode(int mode);
+bool mf_ug_util_is_import_mode(int mode);
+bool mf_ug_util_find_item_from_pnode_list(Eina_List *list, const char *fullpath);
+void mf_ug_util_destory_default_alert_cb();
+int mf_ug_util_set_default_alert_cb(void *data);
+void mf_ug_util_destory_default_ringtone_cb();
+int mf_ug_util_set_default_ringtone_cb(void *data);
+char *mf_ug_util_get_default_alert();
+char *mf_ug_util_get_default_ringtone();
+void mf_ug_util_mmc_remove_action(void *data);
+char **mf_ug_util_get_send_result_array(void *data, int *item_count);
+void mf_ug_util_path_push(char *path, int view_type);
+mf_ug_view_node_s *mf_ug_util_path_pop();
+mf_ug_view_node_s *mf_ug_util_path_top_get();
+void mf_ug_util_view_node_free(mf_ug_view_node_s **view_node);
+void mf_ug_util_path_stack_free();
#endif /* __DEF_MYFILE_UTIL_H_ */
diff --git a/src/include/mf-ug-view.h b/src/include/mf-ug-view.h
new file mode 100644
index 0000000..26bd3d1
--- /dev/null
+++ b/src/include/mf-ug-view.h
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_VIEW_H_DEF__
+#define __MF_UG_VIEW_H_DEF__
+
+#include <Elementary.h>
+
+void mf_ug_search_view_item_append(void *data, void *user_data);
+Evas_Object *mf_widget_create_select_all_layout(Evas_Object *parent);
+
+#endif
diff --git a/src/include/mf-ug-widget.h b/src/include/mf-ug-widget.h
new file mode 100644
index 0000000..0f51dc7
--- /dev/null
+++ b/src/include/mf-ug-widget.h
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __MF_UG_WIDGET_H
+#define __MF_UG_WIDGET_H
+
+#include "mf-ug-main.h"
+
+Evas_Object *mf_ug_widget_create_button(Evas_Object *parent, const char *style,
+ const char *caption, Evas_Object *icon,
+ void (*func) (void *, Evas_Object *, void *),
+ void *data,
+ Eina_Bool flag_propagate);
+void mf_ug_widget_object_text_set(Evas_Object *obj, const char *ID, const char* part);
+void mf_ug_widget_object_item_translate_set(Elm_Object_Item *item, const char *ID);
+
+char *mf_ug_widget_get_text(const char *ID);
+Evas_Object *mf_ug_widget_toolbar_create(Evas_Object *parent);
+Elm_Object_Item *mf_ug_widget_item_tabbar_item_append(Evas_Object *obj,
+ const char *icon,
+ const char *label,
+ Evas_Smart_Cb func,
+ const void *data);
+void mf_ug_widget_object_item_text_set(Elm_Object_Item *item, const char *ID, const char* part);
+Evas_Object *mf_ug_widget_create_progressbar(Evas_Object *parent, char *style);
+Evas_Object *mf_ug_widget_nocontent_create(Evas_Object *parent, const char *text, const char *icon_path);
+Evas_Object *mf_ug_tabbar_create_path_tab(Evas_Object *parent, char *info);
+void mf_ug_navi_bar_create_default_view(void *data);
+void mf_ug_navi_bar_set_ctrl_button(void *data);
+int mf_ug_genlist_ringtone_items_add(void *data, int value);
+Elm_Object_Item *mf_ug_genlist_default_ringtone_item_append(Evas_Object *parent,
+ void *data,
+ int groudValue,
+ Elm_Genlist_Item_Class *itc);
+Elm_Object_Item *mf_ug_genlist_silent_item_append(Evas_Object *parent,
+ void *data,
+ int groudValue,
+ Elm_Genlist_Item_Class *itc);
+
+void mf_ug_object_create_select_all_layout(Evas_Object *pParent, Evas_Smart_Cb pChangeFunc,
+ Evas_Object_Event_Cb pMouseDownFunc, void *pUserData, Evas_Object **pCheckBox, Evas_Object **pSelectLayout);
+#endif
diff --git a/src/include/mf-ug-winset.h b/src/include/mf-ug-winset.h
index a18e85c..745ad40 100644
--- a/src/include/mf-ug-winset.h
+++ b/src/include/mf-ug-winset.h
@@ -1,18 +1,19 @@
/*
- * Copyright 2012 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.
- */
+* Copyright (c) 2000-2015 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* 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 __DEF_MF_UG_WINSET_H_
#define __DEF_MF_UG_WINSET_H_
@@ -21,144 +22,126 @@
#include <assert.h>
#include <Elementary.h>
#include <glib.h>
-#include <vconf.h>
-#include <vconf-keys.h>
-
#include "mf-ug-main.h"
-#include "../../data/ug_edc_common.h"
#include "mf-ug-conf.h"
#include "mf-ug-fs-util.h"
/******************Navigation Bar Definition ***********/
-#define NAVI_MORE_BUTTON_PART "toolbar_more_btn"
-#define NAVI_BOTTOM_BUTTON_1_PART "toolbar_button1"
-#define NAVI_BOTTOM_BUTTON_2_PART "toolbar_button2"
-#define NAVI_BUTTON_STYLE "naviframe/toolbar/default"
-#define NAVI_BUTTON_EDIT "naviframe/more/default"
+#define NAVI_MORE_BUTTON_PART "toolbar_more_btn"
+#define NAVI_BOTTOM_BUTTON_1_PART "toolbar_button1"
+#define NAVI_BOTTOM_BUTTON_2_PART "toolbar_button2"
+#define NAVI_BUTTON_STYLE "naviframe/toolbar/default"
+#define NAVI_BUTTON_EDIT "naviframe/more/default"
-#define TITLE_BTN_STYLE "elm/button/base/naviframe/title_icon"
-#define TITLE_LEFT_BTN "title_left_btn"
-#define TITLE_RIGHT_BTN "title_right_btn"
+#define TITLE_BTN_STYLE "elm/button/base/naviframe/title_icon"
+#define TITLE_LEFT_BTN "title_left_btn"
+#define TITLE_RIGHT_BTN "title_right_btn"
#define MF_UG_NAVI_STYLE_ENABLE "basic"
-#define MF_UG_UPPER_HEIGHT (113*elm_config_scale_get())
-#define MF_UG_UPPER_WIDTH (480*elm_config_scale_get())
+#define MF_UG_UPPER_HEIGHT (113*elm_config_scale_get())
+#define MF_UG_UPPER_WIDTH (480*elm_config_scale_get())
Evas_Object *mf_ug_navi_bar_create_navi_bar(Evas_Object *parent);
void mf_ug_navi_bar_set_new_content(Evas_Object *pLayout, Evas_Object *NaviContent);
void mf_ug_navi_bar_create_default_view(void *data);
-ugNaviBar *mf_ug_navi_bar_get_in_use_navi(void *data);
-void mf_ug_navi_bar_reset_navi_object(ugNaviBar *pNavi_s);
-void mf_ug_navi_bar_refresh_navibar_recovered_view(void *data, ugNaviBar *pNaviStruct);
-void mf_ug_navi_bar_remove_navi_list_item_by_label(void *data, const char *pNaviLabel);
-void mf_ug_navi_bar_set_blocking(void *data, bool bblock_during_transition);
+
void mf_ug_navi_bar_remove_previous_contents(void *data);
-void mf_ug_navi_bar_del_item_directly(void *data);
-void mf_ug_navi_bar_create_new_folder_view(void *data);
-ugNaviBar *ug_mf_navi_bar_get_navi_from_navilist(Eina_List *navilist, const char *label);
-ugNaviBar *mf_ug_navi_bar_get_navi_struct_by_label(void *data, const char *pNaviLabel);
void mf_ug_navi_bar_title_set(void *data);
-Evas_Object *mf_ug_navibar_create_notify_popup(void *data,
- Evas_Object *parent,
- char *label,
- bool time_out,
- void func(void *data, Evas_Object *obj, void *event_info));
+void mf_ug_navi_bar_create_group_radio_box(void *data);
+void mf_ug_navi_bar_button_set_disable(void *data, bool disable);
+void mf_ug_navi_bar_set_path_state(Evas_Object *layout, Eina_Bool flag);
+Evas_Object *mf_ug_navi_bar_create_layout(Evas_Object *parent, const char *edj, const char *grp_name);
+Evas_Object *mf_genlist_create_path_info(Evas_Object *parent, const char *info, Evas_Object **pathinfo);
+Evas_Object *mf_ug_navi_bar_create_box(Evas_Object * parent);
+void mf_ug_navi_add_back_button(void *data);
+void mf_ug_navi_bar_create_delete_view(void *data);
+int mf_ug_navibar_get_ringtone_count(int mode);
-/********** Control Bar Definition ********/
-#define UG_CTRL_ICON_CANCEL UG_ICON_PATH"/myfile_icon_cancel.png"
-#define UG_CTRL_ICON_SAVE UG_ICON_PATH"/myfile_icon_done.png"
-#define UG_TITLE_ICON_HOME UG_ICON_PATH"/Controlbar/U01_controlbar_cion_home.png"
-#define UG_TITLE_ICON_HOME_PRESS UG_ICON_PATH"/Controlbar/U01_controlbar_cion_home_press.png"
-#define UG_TITLE_ICON_UPPER UG_ICON_PATH"/Controlbar/U01_controlbar_cion_up_folder.png"
-#define UG_TITLE_ICON_UPPER_PRESS UG_ICON_PATH"/Controlbar/U01_controlbar_cion_up_folder_press.png"
-
-typedef enum _eCtrlBarButtonType eCtrlBarButtonType;
-
-enum _eCtrlBarButtonType {
- CTRL_BUTTON_CANCEL = 0,
- CTRL_BUTTON_DONE,
- CTRL_BUTTON_ADD,
- CTRL_BUTTON_OTHER_RIONTONGS,
- CTRL_BUTTON_MUSIC,
- CTRL_BUTTON_MAX
-};
+/********** Control Bar Definition ********/
-void mf_ug_ctrl_bar_set(void *data, ugNaviBar *pNavi_s);
-void mf_ug_ctrl_bar_set_item_disable(void *data);
-
-
-/**********Tab Bar Definition *************/
-Evas_Object *mf_ug_tab_bar_create(Evas_Object *parent);
-Elm_Object_Item *mf_ug_tab_bar_append_item(Evas_Object *pTabBar, char *pTabIconPath, char *pTabBarLabel, void *user_data);
-void mf_ug_tab_bar_set_item_view(Evas_Object *tab_layout, Evas_Object *view);
-void mf_ug_tab_bar_remove_item_by_label(Evas_Object *pTabBar, char *pTabLabel);
-void mf_ug_tab_bar_remove_all_items(Evas_Object *pTabBar);
-void mf_ug_tab_bar_set_selected_item(Elm_Object_Item *pItem);
-void mf_ug_tab_bar_set_item_disable(Evas_Object *pTabBar, Eina_Bool disable);
-void mf_ug_ctrl_bar_recover(void *data);
-Elm_Object_Item *mf_ug_tab_bar_get_item_by_label(Evas_Object *pTabBar, char *pTabLabel);
-int mf_ug_tab_bar_items_count_get(Evas_Object *pTabBar);
-void mf_ug_navi_bar_button_set_disable(void *data, bool disable);
+#define UG_TITLE_ICON_HOME "myfile_controlbar_cion_home.png"
+#define UG_TITLE_ICON_HOME_PRESS "myfile_controlbar_cion_home_press.png"
+#define UG_TITLE_ICON_UPPER "myfile_controlbar_cion_up_folder.png"
+#define UG_TITLE_ICON_UPPER_PRESS "myfile_controlbar_cion_up_folder_press.png"
+#define UG_TITLE_ICON_SELECT_ALL "myfile_icon_select_all.png"
+#define UG_TITLE_ICON_SELECT_ALL_PRESS "myfile_icon_select_all_selected.png"
+void mf_ug_navi_bar_set_ctrl_item_disable(void *data);
-/*********** Popup Definition ************/
+/*********** Popup Definition ************/
typedef enum _mf_ug_popup_mode mf_ug_popup_mode;
enum _mf_ug_popup_mode {
- UG_POPMODE_MIN = 0,
- UG_POPMODE_TEXT,
- UG_POPMODE_TITLE_TEXT,
- UG_POPMODE_TEXT_TWO_BTN,
- UG_POPMODE_TITLE_TEXT_TWO_BTN,
- UG_POPMODE_TEXT_BTN,
- UG_POPMODE_TITLE_TEXT_BTN,
- UG_POPMODE_TITLE_TEXT_THREE_BTN,
- UG_POPMODE_PROGRESSBAR,
- UG_POPMODE_SEARCH,
- UG_POPMODE_LIST_BY,
- UG_POPMPDE_MAX
+ UG_POPMODE_MIN = 0,
+ UG_POPMODE_TEXT,
+ UG_POPMODE_TITLE_TEXT,
+ UG_POPMODE_TEXT_TWO_BTN,
+ UG_POPMODE_TITLE_TEXT_TWO_BTN,
+ UG_POPMODE_TEXT_BTN,
+ UG_POPMODE_TITLE_TEXT_BTN,
+ UG_POPMODE_TITLE_TEXT_THREE_BTN,
+ UG_POPMODE_PROGRESSBAR,
+ UG_POPMODE_SEARCH,
+ UG_POPMODE_LIST_BY,
+ UG_POPMPDE_MAX
};
typedef enum _mf_ug_popup_event_type mf_ug_popup_event_type;
enum _mf_ug_popup_event_type {
- UG_ELM_POPUP_NONE,
- UG_ELM_POPUP_YES,
- UG_ELM_POPUP_NO,
- UG_ELM_POPUP_OK,
- UG_ELM_POPUP_CANCLE,
- UG_ELM_POPUP_AUTO_RENAME,
- UG_ELM_POPUP_REPLACE,
- UG_ELM_POPUP_PHONE,
- UG_ELM_POPUP_MEMORY,
- UG_ELM_POPUP_MAX
+ UG_ELM_POPUP_NONE,
+ UG_ELM_POPUP_YES,
+ UG_ELM_POPUP_NO,
+ UG_ELM_POPUP_OK,
+ UG_ELM_POPUP_CANCLE,
+ UG_ELM_POPUP_AUTO_RENAME,
+ UG_ELM_POPUP_REPLACE,
+ UG_ELM_POPUP_PHONE,
+ UG_ELM_POPUP_MEMORY,
+ UG_ELM_POPUP_MAX
};
-/*********** Popup API ************/
+/*********** Popup API ************/
Evas_Object *mf_ug_popup_create(void *data, mf_ug_popup_mode popupMode, char *title, const char *context, const char *first_btn_text, const char *second_btn_text,
- const char *third_btn_text, Evas_Smart_Cb func, void *param);
-void mf_ug_popup_indicator_popup(const char *text);
+ const char *third_btn_text, Evas_Smart_Cb func, void *param);
+void mf_ug_popup_indicator_popup(char *text);
+Evas_Object *mf_ug_popup_create_new_folder_popup(void *data, char *context);
+Evas_Object *mf_ug_popup_create_search(void *data, Evas_Smart_Cb func, void *param);
+Evas_Object *mf_ug_progress_get();
+void mf_ug_progress_set(Evas_Object *progress);
+Eina_Bool mf_ug_popup_present_flag_get();
+
void mf_ug_context_popup_create_more(void *data, Evas_Object *parent);
+void mf_ug_resize_more_ctxpopup_cb(void *data, Evas_Object *obj, void *event_info);
/******************* Genlist API *********************/
-void mf_ug_upper_genlist_item_append(Evas_Object *pGenlist, void *data);
-void mf_ug_genlist_goto_myfile_item_append(Evas_Object *pGenlist, void *data);
-Evas_Object *mf_navi_bar_upper_create(Evas_Object *parent);
-void mf_ug_genlist_goto_myfile_style_set(void *data);
-void mf_ug_genlist_upper_style_set(void *data);
-Evas_Object *mf_ug_genlist_create_no_content(void *data);
Evas_Object *mf_ug_genlist_create_content_list_view(void *data);
Evas_Object *__mf_ug_genlist_create_gl(void *data);
-Evas_Object *mf_ug_genlist_create_list_new_folder_style(void *data);
Evas_Object *mf_ug_genlist_create_path_info(Evas_Object *parent, Elm_Genlist_Item_Class *itc, char *info);
Elm_Object_Item *mf_ug_genlist_item_append(Evas_Object *parent,
- ugFsNodeInfo *pNode,
- void *data,
- int groudValue,
- Elm_Genlist_Item_Class *itc);
+ char *real_name,
+ void *data,
+ int groudValue,
+ Elm_Genlist_Item_Class *itc);
void mf_ug_genlist_selected_gl(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_genlist_item_remove(Evas_Object *parent, int storage);
+Evas_Object *mf_ug_genlist_create_checkbox(Evas_Object *parent);
+
+void mf_ug_navi_bar_push_content(void *data, Evas_Object *NaviContent);
+Evas_Object *mf_popup_center_processing(Evas_Object *parent,
+ const char *context,
+ Evas_Smart_Cb func,
+ void *param);
+void mf_ug_genlist_first_item_append(void *data, char *fullpath);
+void mf_ug_select_all_layout_mouse_down_cb(void *data, Evas_Object *obj, void *event_info);
+void mf_ug_genlist_item_bringin_top(void *data, const char *music_path);
+Evas_Object *mf_ug_genlist_delete_style_create(void *data);
+int mf_ug_genlist_ringtone_delete_items_add(void *data, int value);
+void mf_ug_genlist_first_item_insert(void *data, char *fullpath, Elm_Object_Item *insert_afer);
+Elm_Object_Item *mf_ug_genlist_default_item_get();
+void mf_ug_genlist_show_select_info(void *data);
#endif