Merge "fixed bug of app-control that didn't work with font-size" into 2.0_beta
[apps/core/preloaded/settings.git] / include / setting.h
old mode 100644 (file)
new mode 100755 (executable)
index ffad409..2f70de9
@@ -1,44 +1,54 @@
 /*
-  * Copyright 2012  Samsung Electronics Co., Ltd
-  *
-  * Licensed under the Flora License, Version 1.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.tizenopensource.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.
-  */
-/****
+ * setting
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Contact: MyoungJune Park <mj2004.park@samsung.com>
+ *
+ * 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.
+ *
+ */
+/**
  *@defgroup setting-app
  *entry point of Setting application
  */
 #ifndef __SETTING_H__
 #define __SETTING_H__
 
-#include <appcore-efl.h>
+#include <setting-cfg.h>
 
 #include <setting-common-draw-widget.h>
 #include <setting-common-view.h>
-#include <setting-cfg.h>
-
 
 /*  TAPI*/
-#include <TapiCommon.h>
-#include <ITapiPower.h>
+#include <tapi_common.h>
+#include <ITapiModem.h>
 
-#include <bundle.h>
-#include <ui-gadget.h>
+#include <sensors.h>
 
 #define EDIT_PREFERRED_STR "IDS_ST_BUTTON2_EDIT_PREFERRED"
-#define PREFERRED_STR "IDS_ST_TAB_PREFERRED"
+//#define PREFERRED_STR "IDS_ST_TAB_PREFERRED"
+#define PREFERRED_STR "IDS_ST_BODY_FREQUENTLY_USED"
 #define ALL_STR "IDS_ST_OPT_ALL"
 #define SETTING_MAX_PID_LEN 128
 
+#define NO_UG_FOUND_MSG                        _("Unsupported menu")
+#define USB_NEED_OFF "Please turn USB tethering off first in Mobile hotspot"
+
+#define SETTING_NFC_DESC "IDS_ST_BODY_ALLOW_DATA_EXCHANGE_WHEN_DEVICE_TOUCHES_ANOTHER_DEVICE"
+#define SETTING_WIFI_DIRECT_DESC "IDS_ST_BODY_SET_UP_PEER_TO_PEER_CONNECTIVITY_ABB"
+#define SETTING_KIES_VIA_WIFI_DESC "IDS_ST_BODY_CONNECT_TO_KIES_VIA_WI_FI"
+
 /**
 * @brief
 */
@@ -66,40 +76,45 @@ typedef enum _MAIN_PROFILE_Type {
        MAIN_PROFILE_MAX
 } MAIN_PROFILE_Type;
 
+/**
+ * enum for genlist item to be updated
+ * @see setting_update_gl_item
+ */
 typedef enum _Update_GL_Item_Type {
        GL_ITEM_WIFI = 0,
        GL_ITEM_BT,
+       GL_ITEM_NFC,
        GL_ITEM_MAP,
        GL_ITEM_USB,
-       GL_ITEM_THEME,
 
-       GL_ITEM_ROAMING,
        GL_ITEM_ROTATION,
+       GL_ITEM_FLIGHT,
 
        GL_ITEM_MAX
 } Update_GL_Item_Type;
 
-#define VCONF_KEY_EVENT_ARR_SIZE 11
-typedef struct _vconf_key_change_event
-{
-       // member data
-       char *in_key[VCONF_KEY_EVENT_ARR_SIZE];
-       vconf_callback_fn cb[VCONF_KEY_EVENT_ARR_SIZE];
-       // member functions
-       int (*listen)(struct _vconf_key_change_event* me, void* data);
-       int (*unlisten)(struct _vconf_key_change_event* me, void* data);
-}vconf_key_change_event;
+typedef enum _FLIGHT_MODE_OPEARTION{
+       FM_INVALID = 0,//There is no request waiting for processing
+       FM_ENTER = 1,//Some "flightmode enter" request is waiting for processing
+       FM_LEAVE,//Some "flightmode leave" request is waiting for processing
+} FLIGHT_MODE_OPEARTION;
+
 
+#define MAX_MORE_MENU_NUM      6
 /**
 * @brief main view context
 */
 typedef struct _setting_main_appdata {
-       struct ui_gadget *ug;
+
+       ui_gadget_h ug;
+       TapiHandle *handle;
+               
        Eina_Bool bAppPause;
        Eina_Bool updateItems[GL_ITEM_MAX];
 
        Evas *evas;
        Evas_Object *win_main;
+       Evas_Object *controlbar;
 
        Evas_Object *controllbar_all_check;
        Evas_Object *gl_sel_all;
@@ -117,38 +132,46 @@ typedef struct _setting_main_appdata {
        Elm_Object_Item *segment_all;
        Elm_Object_Item *segment_preferred;
 
-       bool need_register;
        bool isInUGMode;
 
+       /* vars for flightmode */
+       bool b_fm_requesting;//whether some request is processing. 1:yes, 0:no
+       FLIGHT_MODE_OPEARTION fm_waiting_op;
+
+
        /* special layout */
+       Setting_GenGroupItem_Data *data_flight;
        Setting_GenGroupItem_Data *data_wifi;
        Setting_GenGroupItem_Data *data_bt;
-       Setting_GenGroupItem_Data *data_roaming;
        Setting_GenGroupItem_Data *data_rotationMode;
        Setting_GenGroupItem_Data *data_mobileApp;
 
-       Setting_GenGroupItem_Data *data_usbcon;
-       Setting_GenGroupItem_Data *data_theme;
+       Setting_GenGroupItem_Data *data_bright;
 
        Setting_GenGroupItem_Data *data_moreSystem;
        Setting_GenGroupItem_Data *data_moreConnect;
+       Setting_GenGroupItem_Data *data_nfc;
 
        Setting_View_Type view_type;
 
-       Evas_Object *main_genlist;                              /**< genlist in main page */
-       Evas_Object *all_check_genlist;
+       Evas_Object *main_genlist;                              /**< 'Setting main' in main page */
+       Evas_Object *edit_preferred_genlist;    /**< 'Edit preferred' page */
 
        Elm_Genlist_Item_Class itc[GENDIAL_Type_MAX];
 
-       Eina_List *item_check_list;
-       Setting_GenGroupItem_Data *check_all_item;
-       /*  Animation effect for Ui-Gadget. */
-       Evas_Object *ly;
+       Eina_List *item_check_list;                                /**< in preferred view, store the selected items in the list.  */
+       Setting_GenGroupItem_Data *check_all_item; /**< genlist node for "Select all" */
 
+       Evas_Object *flight_popup;
        Evas_Object *data_roaming_popup;
 
        // listen / unlisten code
-       vconf_key_change_event vk_events;
+       Eina_List *listened_list;
+       sensor_h sf_handle;
+
+       const char *more_connective_menus[MAX_MORE_MENU_NUM];
+       const char *more_system_menus[MAX_MORE_MENU_NUM];
+       
 
 } setting_main_appdata;
 
@@ -158,7 +181,4 @@ extern setting_view setting_view_more_menu;
 extern void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist);
 extern void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object *genlist);
 
-void signal_hide_finished(void *data, Evas_Object *obj, const char *emission,
-                         const char *source);
-
 #endif                         /* __SETTING_H__ */