Tizen 2.0 Release
[apps/home/settings.git] / setting-memory / include / setting-memory.h
1 /*
2  * setting
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Flora License, Version 1.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://floralicense.org/license/
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef __SETTING_MEMORY_H__
18 #define __SETTING_MEMORY_H__
19
20 #include <stdio.h>
21 #include <Elementary.h>
22
23 #include <glib-object.h>
24
25 #include <utilX.h>
26
27 #include <setting-common-draw-widget.h>
28 #include <setting-common-view.h>
29 #include <setting-debug.h>
30 #include <sysman.h>
31
32 typedef void (*setting_memory_mmc_cb) (int val, void *data);
33
34 typedef struct _SettingMemoryUG SettingMemoryUG;
35
36 typedef struct setting_memory_umem_size {
37         unsigned long total_mem_size;
38         unsigned long free_mem_size;
39         unsigned long used_mem_size;
40         unsigned long block_size;
41         unsigned long mms_size;
42         unsigned long myfiles_size;
43         unsigned long etc_size;
44 } setting_memory_umem_size_t;
45
46 typedef struct __setting_mem_status {
47         double  dTotal;
48         double  dAvail;
49 } setting_mem_status;
50
51 /**
52  * Setting Memory UG context
53  * all UG function has void* as an agument. this is casted back to SettingMemoryUG
54  * and the functions access app context.
55  */
56 struct _SettingMemoryUG {
57         ui_gadget_h ug;
58         ui_gadget_h ug_loading;
59
60         Evas *evas;
61         Evas_Object *win_main_layout;
62         Evas_Object *win_get;
63         Evas_Object *popup;
64         setting_call_back_func curr_popup_cb;
65
66         Evas_Object *progress_bar;
67         Ecore_Timer *wait_timer;
68         Ecore_Timer *popup_timer;
69         Ecore_Timer *progress_bar_timer;
70         float progress_bar_rate;
71         Evas_Object *navi_bar;
72
73         Evas_Object *msg_intial_popup;
74         Evas_Object *ly_main;
75
76         Setting_GenGroupItem_Data *data_wap;
77         Setting_GenGroupItem_Data *data_bt;
78         Setting_GenGroupItem_Data *data_cmr;
79         Setting_GenGroupItem_Data *data_vrec;
80         Setting_GenGroupItem_Data *data_rdo;
81         Setting_GenGroupItem_Data *data_shr;
82         Setting_GenGroupItem_Data *data_adobeAir;
83         Setting_GenGroupItem_Data *data_dvb_h;
84
85         setting_memory_umem_size_t umem_size;
86         Elm_Genlist_Item_Class itc_1text_1icon_2;
87         Elm_Genlist_Item_Class itc_group_item;
88         Elm_Genlist_Item_Class itc_1text;
89         Elm_Genlist_Item_Class itc_1text_1icon;
90         Elm_Genlist_Item_Class itc_sel_all;
91         Elm_Genlist_Item_Class itc_seperator;
92         Elm_Genlist_Item_Class itc_variable_height;
93         Elm_Genlist_Item_Class itc_2text_3_parent;
94         Elm_Genlist_Item_Class itc_1icon_1text_sub;
95         Elm_Genlist_Item_Class itc_2text_2;
96         Setting_GenGroupItem_Data *data_ex_total;
97         Setting_GenGroupItem_Data *data_ex_available;
98         Setting_GenGroupItem_Data *data_ex_mount;
99         Setting_GenGroupItem_Data *data_ex_format;
100         Setting_GenGroupItem_Data *data_in_total;
101         Setting_GenGroupItem_Data *data_in_available;
102         Setting_GenGroupItem_Data *data_in_format;
103         Setting_GenGroupItem_Data *data_phone_storage_available;
104         Setting_GenGroupItem_Data *data_main_storage_available;
105         Setting_GenGroupItem_Data *data_system_storage_available;
106         struct mmc_contents *mmc_content;
107 };
108
109 extern setting_view setting_view_memory_main;
110 extern setting_view setting_view_memory_default_memory;
111 extern setting_view setting_view_memory_status;
112
113
114 #endif                          /* __SETTING_MEMORY_H__ */