4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
6 * Contact: MyoungJune Park <mj2004.park@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 *@defgroup setting-app
23 *entry point of Setting application
28 #include <setting-cfg.h>
30 #include <setting-common-draw-widget.h>
31 #include <setting-common-view.h>
34 #include <tapi_common.h>
35 #include <ITapiModem.h>
38 #define EDIT_PREFERRED_STR "IDS_ST_BUTTON2_EDIT_PREFERRED"
39 //#define PREFERRED_STR "IDS_ST_TAB_PREFERRED"
40 #define PREFERRED_STR "IDS_ST_BODY_FREQUENTLY_USED"
41 #define ALL_STR "IDS_ST_OPT_ALL"
42 #define SETTING_MAX_PID_LEN 128
44 #define NO_UG_FOUND_MSG _("Unsupported menu")
45 #define MORE_CONNECT_STR "IDS_ST_BODY_BLUETOOTH_USB_UTILITIES_ETC"
46 #define MORE_SYSTEM_STR "IDS_ST_BODY_DATE_AND_TIME_KEYBOARD_LICENCE_ETC"
47 #define USB_NEED_OFF "Please turn USB tethering off first in Mobile hotspot"
49 #define SETTING_NFC_DESC "IDS_ST_BODY_ALLOW_DATA_EXCHANGE_WHEN_DEVICE_TOUCHES_ANOTHER_DEVICE"
50 #define SETTING_WIFI_DIRECT_DESC "IDS_ST_BODY_SET_UP_PEER_TO_PEER_CONNECTIVITY_ABB"
51 #define SETTING_KIES_VIA_WIFI_DESC "IDS_ST_BODY_CONNECT_TO_KIES_VIA_WI_FI"
56 typedef enum _setting_view_type {
57 SETTING_VIEW_MAIN = 0,
58 SETTING_VIEW_CONNECTIVE_MORE,
59 SETTING_VIEW_SYSTEM_MORE,
60 SETTING_VIEW_ALL_CHECK = 9,
63 typedef void (*menu_list_load_fn) (void *data);
64 typedef void (*menu_list_load_fn2) (void *, Cfg_Item_Position, Evas_Object *);
66 typedef enum _List_Load_Func_Type {
67 Func_Type_Connectivity = 0,
70 Func_Type_DownApp = 3,
72 } List_Load_Func_Type;
74 typedef enum _MAIN_PROFILE_Type {
75 MAIN_PROFILE_PREFERRED = 0,
81 * enum for genlist item to be updated
82 * @see setting_update_gl_item
84 typedef enum _Update_GL_Item_Type {
95 } Update_GL_Item_Type;
97 typedef enum _FLIGHT_MODE_OPEARTION{
98 FM_INVALID = 0,//There is no request waiting for processing
99 FM_ENTER = 1,//Some "flightmode enter" request is waiting for processing
100 FM_LEAVE,//Some "flightmode leave" request is waiting for processing
101 } FLIGHT_MODE_OPEARTION;
104 * @brief main view context
106 typedef struct _setting_main_appdata {
112 Eina_Bool updateItems[GL_ITEM_MAX];
115 Evas_Object *win_main;
116 Evas_Object *controlbar;
118 Evas_Object *controllbar_all_check;
119 Evas_Object *gl_sel_all;
121 menu_list_load_fn load_fns[Func_Type_MAX];
122 MAIN_PROFILE_Type profile_type;
124 Evas_Object *navibar_main;
126 Evas_Object *ly_main; /**< seting view main */
127 Setting_View_Type view_load;
128 Evas_Object *genlist_load;
130 Elm_Object_Item *edit_item;
131 Elm_Object_Item *segment_all;
132 Elm_Object_Item *segment_preferred;
136 /* vars for flightmode */
137 bool b_fm_requesting;//whether some request is processing. 1:yes, 0:no
138 FLIGHT_MODE_OPEARTION fm_waiting_op;
142 Setting_GenGroupItem_Data *data_flight;
143 Setting_GenGroupItem_Data *data_wifi;
144 Setting_GenGroupItem_Data *data_bt;
145 Setting_GenGroupItem_Data *data_rotationMode;
146 Setting_GenGroupItem_Data *data_mobileApp;
148 Setting_GenGroupItem_Data *data_bright;
150 Setting_GenGroupItem_Data *data_moreSystem;
151 Setting_GenGroupItem_Data *data_moreConnect;
152 Setting_GenGroupItem_Data *data_nfc;
154 Setting_View_Type view_type;
156 Evas_Object *main_genlist; /**< 'Setting main' in main page */
157 Evas_Object *edit_preferred_genlist; /**< 'Edit preferred' page */
159 Elm_Genlist_Item_Class itc[GENDIAL_Type_MAX];
161 Eina_List *item_check_list; /**< in preferred view, store the selected items in the list. */
162 Setting_GenGroupItem_Data *check_all_item; /**< genlist node for "Select all" */
164 Evas_Object *flight_popup;
165 Evas_Object *data_roaming_popup;
167 // listen / unlisten code
168 Eina_List *listened_list;
171 } setting_main_appdata;
174 extern setting_view setting_view_main;
175 extern setting_view setting_view_more_menu;
176 extern void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist);
177 extern void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist);
179 #endif /* __SETTING_H__ */