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_APPMGR_H__
20 #define __SETTING_APPMGR_H__
25 #include <Elementary.h>
26 #include <pkgmgr-info.h>
27 #include <package-manager.h>
29 #include "setting-common-view.h"
30 #include "setting-common-draw-widget.h"
31 #include "setting-appmgr-string.h"
33 #define _S(s) dgettext("sys_string", s)
35 #define SAFE_STRDUP(src) (src)?strdup(src):NULL
37 #define FREEandSTRDUP(dest, src) \
39 if (dest) { free(dest); dest=NULL; }\
40 if (src || *src) dest = strdup(src); \
45 APPMGRUG_TAB_DOWNLOAD,
48 APPMGRUG_TAB_DISABLED,
53 APPMGRUG_PKG_REQUEST_NONE,
54 APPMGRUG_PKG_REQUEST_UNINSTALL,
55 APPMGRUG_PKG_REQUEST_MOVE,
56 APPMGRUG_PKG_REQUEST_DISABLE,
57 APPMGRUG_PKG_REQUEST_ENABLE,
58 APPMGRUG_PKG_REQUEST_RESET
61 typedef struct _appmgr_pkginfo {
77 bool is_support_disable;
81 pkgmgrinfo_installed_storage storage;
83 pkgmgr_client *pc_size;
84 pkgmgr_client *pc_request;
85 Setting_GenGroupItem_Data *total_size;
86 Setting_GenGroupItem_Data *data_size;
87 Setting_GenGroupItem_Data *app_size;
89 Setting_GenGroupItem_Data *first_prv;
90 Setting_GenGroupItem_Data *last_prv;
92 Elm_Object_Item *def_sep;
98 typedef struct _appmgr_listinfo {
99 Elm_Object_Item *item;
115 typedef struct _appmgr_runinfo {
121 typedef struct _SettingAppMgrUG {
128 Evas_Object *sort_rdg;
131 setting_view *main_view;
132 setting_view *runinfo_view;
133 setting_view *pkginfo_view;
136 Evas_Object *lo_parent;
138 Evas_Object *lo_main;
143 Elm_Object_Item *navi_main_it;
144 Evas_Object *gl_main;
145 Evas_Object *lo_noitem;
147 Evas_Object *def_toolbar;
148 pkgmgr_client *pc_main;
149 pkgmgr_client *pc_all_size;
152 Ecore_Idler *size_idler;
155 void *running_list_worker;
164 int is_runlist_ready;
169 appmgr_listinfo *info_run;
172 bool support_taskmanager;
174 Evas_Object *pkg_toolbar;
176 appmgr_pkginfo *pkginfo;
178 Ecore_Timer *pkginfo_getsize_timer;
180 Elm_Genlist_Item_Class itc_main;
181 Elm_Genlist_Item_Class info_itc;
182 Elm_Genlist_Item_Class itc_sep;
183 Elm_Genlist_Item_Class itc_1txt_1ic_2;
184 Elm_Genlist_Item_Class itc_1txt;
185 Elm_Genlist_Item_Class itc_priv;
186 Elm_Genlist_Item_Class itc_multiline;
187 Elm_Genlist_Item_Class itc_grp_title;
188 Elm_Genlist_Item_Class itc_info_title;
189 Elm_Genlist_Item_Class itc_1ic;
190 Elm_Genlist_Item_Class itc_2txt_2;
191 Elm_Genlist_Item_Class itc_multiline_2txt;
192 Elm_Genlist_Item_Class itc_2button1;
193 Elm_Genlist_Item_Class itc_2button2;
194 Elm_Genlist_Item_Class itc_1button;
196 Setting_GenGroupItem_Data *cache_size;
197 Setting_GenGroupItem_Data *clear_cache;
200 #define APPMGRUG_TIME(fmt, arg...) \
203 gettimeofday(&tv, NULL); \
204 double now = tv.tv_sec * 1000 + (double)tv.tv_usec/1000; \
205 SETTING_TRACE_DEBUG(fmt" time = %f ms", ##arg, now); \
209 extern setting_view setting_view_appmgr_pkginfo;
210 extern setting_view setting_view_appmgr_main;
212 #endif /*__SETTING_APPMGR_H__ */