4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #ifndef __SETTING_STORAGE_H__
20 #define __SETTING_STORAGE_H__
26 #include <Elementary.h>
27 #include <dd-deviced.h>
28 #include <package-manager.h>
30 #include "setting-common-view.h"
31 #include "setting-common-draw-widget.h"
32 #include "setting-storage-string.h"
34 extern const char *storageUg_MMC_stat;
35 extern const char *storageUg_ENCRYPT_stat;
38 #define SETTING_STORAGE_PIE_RECT_OFFSET (36 * WIDGET_SCALE_FACTOR)
39 #define SETTING_STORAGE_DEFAULT_STORAGE_APP_DESP_SIZE (240 * WIDGET_SCALE_FACTOR)
41 #define SETTING_STORAGE_POPUP_TIMER 2
42 #define SETTING_STORAGE_PROGRESSBAR_TIMEOUT 10
45 #define SAFE_STRDUP(src) (src)?strdup(src):NULL
47 typedef struct _Setting_Storage_Status {
50 } Setting_Storage_Status;
53 typedef struct _SettingStorageUG SettingStorageUG;
63 } storageUg_worker_data;
65 struct _SettingStorageUG {
68 setting_view *main_view;
69 setting_view *default_view;
70 setting_view *misces_view;
73 Evas_Object *lo_parent;
81 Elm_Genlist_Item_Class itc_2text_3_parent;
82 Elm_Genlist_Item_Class itc_1icon_1text_sub;
83 Elm_Genlist_Item_Class itc_2text_2;
84 Elm_Genlist_Item_Class itc_group_item;
85 Elm_Genlist_Item_Class itc_2text_1icon_3;
86 Elm_Genlist_Item_Class itc_1text;
87 Elm_Genlist_Item_Class itc_1text_1icon;
88 Elm_Genlist_Item_Class itc_pie;
89 Elm_Genlist_Item_Class itc_notice;
90 Elm_Genlist_Item_Class itc_color_item;
91 Elm_Genlist_Item_Class itc_msic_file_item;
93 double sz_inter_total;
94 double sz_inter_avail;
97 double sz_pics_videos;
102 Setting_GenGroupItem_Data *total_space;
103 Setting_GenGroupItem_Data *sys_mem;
104 Setting_GenGroupItem_Data *apps;
105 Setting_GenGroupItem_Data *pics_videos;
106 Setting_GenGroupItem_Data *audio;
107 Setting_GenGroupItem_Data *misces;
108 Setting_GenGroupItem_Data *caches;
109 Setting_GenGroupItem_Data *avail;
111 pkgmgr_client *pc_total_size;
114 Elm_Object_Item *pie_it;
117 Setting_GenGroupItem_Data *sd_card;
118 Setting_GenGroupItem_Data *sd_mount;
119 Setting_GenGroupItem_Data *sd_total;
120 Setting_GenGroupItem_Data *sd_avail;
121 Setting_GenGroupItem_Data *sd_format;
122 struct mmc_contents mmc_content;
125 /* usb otg storage */
126 Setting_GenGroupItem_Data *usb_card;
127 Setting_GenGroupItem_Data *usb_mount;
128 Setting_GenGroupItem_Data *usb_total;
129 Setting_GenGroupItem_Data *usb_available;
130 Setting_GenGroupItem_Data *usb_unmount;
131 Setting_GenGroupItem_Data *usb_format;
132 Elm_Object_Item *usb_sep_item;
140 Ecore_Idler *update_idler;
141 Ecore_Timer *update_timer;
143 /* default storage */
144 Setting_GenGroupItem_Data *data_bt;
145 Setting_GenGroupItem_Data *data_nfc;
146 Setting_GenGroupItem_Data *data_wifidirect;
147 Setting_GenGroupItem_Data *data_installapp;
149 /* miscellaneous files list */
150 int misc_view_mode; /** 0 : default 1 : delete layout */
152 Elm_Object_Item *main_misces_navi_it;
153 Elm_Object_Item *misces_navi_it;
155 Evas_Object *gl_misces; /** genlist for misc list */
156 Evas_Object *misces_lo_noitem;
158 Eina_Bool misces_is_select_all;
159 Eina_List *misces_list;
160 Eina_List *misces_sel_list;
164 bool misces_ctx_popup_selected;
167 Evas_Object *ly_select_all; /** misc > 'select all' layout */
168 Evas_Object* ly_default;
170 Evas_Object *title_left_btn;
171 Evas_Object *title_right_btn;
176 #endif /*__SETTING_STORAGE_H__ */