/*
* ug-mobile-ap
*
-* Copyright 2012 Samsung Electronics Co., Ltd
+* Copyright 2012-2013 Samsung Electronics Co., Ltd
-* Licensed under the Flora License, Version 1.0 (the "License");
+* Licensed under the Flora License, Version 1.1 (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
+* http://floralicense.org/license
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
#endif
#if !defined(PACKAGE)
-#define PACKAGE "ug-setting-mobile-ap-ug"
+#define PACKAGE "ug-setting-mobileap-efl"
#endif
#if !defined(LOCALEDIR)
#endif
#if !defined(EDJDIR)
-#define EDJDIR "/usr/ug/res/edje/ug-mobile-ap"
+#define EDJDIR "/usr/ug/res/edje/ug-setting-mobileap-efl"
#endif
#if !defined(PREFIX)
#define __MOBILE_AP_FUNC_ENTER__ DBG("Entering: +\n")
#define __MOBILE_AP_FUNC_EXIT__ DBG("Exit: -\n")
-#define MOBILE_AP_IMG_DIR PREFIX"/res/images/ug-mobile-ap"
-
-#define MH_DEFAULT_PASSWORD "qwertyuiop"
+#define TETHERING_IMAGES_EDJ "tethering_images.edj"
+#define WIFI_ICON "Wifi.png"
+#define BT_ICON "Bluetooth.png"
+#define USB_ICON "USB.png"
#define DEVICE_NAME_LENGTH_MAX 31
#define WIFI_PASSPHRASE_LENGTH_MIN 8
#define WIFI_PASSPHRASE_LENGTH_MAX 63
#define MH_LABEL_LENGTH_MAX 1024
-#define FONT_SIZE_20 20
-#define FONT_SIZE_25 25
-#define FONT_SIZE_30 30
-#define FONT_SIZE_32 32
#define _EDJ(obj) elm_layout_edje_get(obj)
+#define TETHERING_WIFI_MAX_CONNECTED_STA 8
+#define TETHERING_BT_MAX_CONNECTED_STA 7
+#define TETHERING_USB_MAX_CONNECTED_STA 1
+#define TETHERING_MAX_CONNECTED_STA \
+ (TETHERING_WIFI_MAX_CONNECTED_STA + TETHERING_BT_MAX_CONNECTED_STA + TETHERING_USB_MAX_CONNECTED_STA)
+
/* This is from tethering_private.h */
-#define TETHERING_MAX_CONNECTED_STA 16 /**< Maximum connected station. 8(Wi-Fi) + 7(BT) + 1(USB) */
#define TETHERING_TYPE_MAX 4 /**< All, USB, Wi-Fi, BT */
typedef enum {
/* Two buttons pop-up */
MH_POP_WIFI_OFF_CONF,
MH_POP_WIFI_ON_CONF,
+ MH_POP_BT_ON_CONF,
MH_POP_USB_ON_CONF,
+ MH_POP_USB_ON_PREVCONN_CONF,
+ MH_POP_ENTER_TO_WIFI_SETUP_CONF,
/* One button pop-up */
MH_POP_INFORMATION,
MH_POP_USB_CONNECT,
- MH_POP_WIFI_PASSWORD_SHORT,
/* No button & timeout pop-up */
MH_POP_INFORMATION_WO_BUTTON,
} mh_state_e;
typedef struct ap_app_main {
- Evas_Object *conform;
Evas_Object *genlist;
Evas_Object *back_btn;
Elm_Genlist_Item_Class *end_sp_itc;
Elm_Genlist_Item_Class *wifi_itc;
Elm_Genlist_Item_Class *setup_itc;
- Elm_Genlist_Item_Class *setup_help_itc;
Elm_Genlist_Item_Class *bt_itc;
Elm_Genlist_Item_Class *usb_itc;
Elm_Genlist_Item_Class *help_itc;
Elm_Genlist_Item_Class *usage_itc;
Elm_Genlist_Item_Class *dev_itc[TETHERING_TYPE_MAX];
+ Elm_Object_Item *sp_item[4];
Elm_Object_Item *wifi_item;
Elm_Object_Item *setup_item;
- Elm_Object_Item *setup_help_item;
Elm_Object_Item *bt_item;
Elm_Object_Item *usb_item;
Elm_Object_Item *device_item;
int hotspot_mode;
int wifi_state;
+ int bt_state;
int usb_state;
+ bool need_recover_wifi_tethering;
} mh_main_view_t;
typedef struct {
- Evas_Object *conform;
+ Elm_Object_Item *navi_it;
Evas_Object *genlist;
Evas_Object *back_btn;
+ Evas_Object *title_back_btn;
Evas_Object *hide_btn;
Evas_Object *security_btn;
- Evas_Object *pw_layout;
Evas_Object *pw_entry;
Elm_Genlist_Item_Class *sp_itc;
Elm_Genlist_Item_Class *pw_itc;
Elm_Genlist_Item_Class *name_itc;
+ Elm_Object_Item *sp_item[2];
Elm_Object_Item *hide_item;
Elm_Object_Item *security_item;
Elm_Object_Item *pw_item;
char device_name[DEVICE_NAME_LENGTH_MAX + 1];
char wifi_passphrase[WIFI_PASSPHRASE_LENGTH_MAX + 1];
+ char wifi_passphrase_new[WIFI_PASSPHRASE_LENGTH_MAX + 1];
} mh_wifi_setting_view_t;
typedef struct {
connection_h conn_handle;
Evas_Object *win;
+ Evas_Object *layout;
+ Evas_Object *bg;
+
Evas_Object *naviframe;
Evas_Object *popup;
mh_data_usage_t data_statistics;
mh_clients_t clients;
- int popup_type;
- char popup_string[MH_LABEL_LENGTH_MAX];
+ enum ug_event rotate_state;
+ Ecore_IMF_Input_Panel_State imf_state;
} mh_appdata_t;
typedef struct {
- Evas_Object *base;
mh_appdata_t *ad;
ui_gadget_h ug;
} mh_ugdata_t;