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.
21 #ifndef __SETTING_PHONE_H__
22 #define __SETTING_PHONE_H__
25 #include <Elementary.h>
28 #include <glib-object.h>
30 #include <setting-common-draw-widget.h>
31 #include <setting-common-view.h>
38 #include <tapi_common.h>
40 #include <TapiUtility.h>
42 #include <unicode/ucal.h>
43 #include <unicode/uloc.h>
44 #include <unicode/udat.h>
45 #include <unicode/ustring.h>
46 #include <unicode/udatpg.h>
47 #include <unicode/utmscale.h>
49 /* Choose default programe*/
50 #define Display_APP_Full_Name 1
51 #define MAX_APP_NAME 1024
52 #define IMAGES_MIME_TYPE "image/png" /* temporary implement */
53 #define SOUNDS_MIME_TYPE "audio/mpeg" /* temporary implement */
54 #define VIDEOS_MIME_TYPE "video/3gpp" /* temporary implement */
55 #define OTHERS_MIME_TYPE "application/pdf" /* temporary implement */
56 #define TBL_NAME "menu"
57 #define MIME_FIELD_NAME "mimetype"
58 #define NAME_BUF_LEN (128)
60 #define REGION_ITEM_MAX 300
62 #define SETTING_PHONE_EXAMPLE_NUMBER "Number"
64 #define ASK_DEREG_PHONE "<linesize=44>Your phone is<br>already registered.<br> Are you sure you<br>wish to deregister?"
65 #define REGISTRATION_GET_FAILED "Failed to get registration code"
66 #define REGISTRATION_INDICATOT "<br><br><br><br>Your device<br>registration code:<br><br>"
67 #define REGISTRATION_AT "<br><br><br>Register at"
68 #define DEREGISTRATION_INDICATOT "<br><br><br><br>Your device<br>deregistration code:<br><br>"
69 #define EREGISTRATION_AT "<br><br><br>Deregister at"
70 #define TRANSFER_INFO "Your recommendation information is also sent with the file you transfer"
72 typedef struct _SettingPhoneUG SettingPhoneUG;
75 * Setting Phone UG context
76 * all UG function has void* as an agument. this is casted back to SettingPhoneUG
77 * and the functions access app context.
79 struct _SettingPhoneUG {
83 /* add more variables here (move your appdata to here) */
85 Evas_Object *win_main_layout;
87 ui_gadget_h ug_loading;
89 Evas_Object *gl_lang_region;
91 Evas_Object *gl_region;
93 Evas_Object *navi_bar;
95 Evas_Object *popup_clear_license;
96 void (*popup_cb) (void *data, Evas_Object *obj, void *event_info);
98 int intial_shaking_value;
100 Evas_Object *ly_language;
103 Evas_Object *chk_lang;
104 int prev_lang; /** prev is used for special lang. */
106 //bundle *bundle_data;
107 service_h bundle_data;
108 setting_view *view_to_load;
109 TelSimImsiInfo_t imsi;
110 const char *sim_lang; /** is just used for '0' (automatic). */
111 Elm_Genlist_Item_Class itc_1text;
112 Elm_Genlist_Item_Class itc_1text_1icon_2;
113 Elm_Genlist_Item_Class itc_1text_1icon;
114 Elm_Genlist_Item_Class itc_seperator;
115 Elm_Genlist_Item_Class itc_2text_3_parent;
116 Elm_Genlist_Item_Class itc_1icon_1text_sub;
117 Elm_Genlist_Item_Class itc_1icon_2text;
119 // [view] Language & Region
120 Setting_GenGroupItem_Data *data_display_language;
121 Setting_GenGroupItem_Data *data_region_fmt;
122 Setting_GenGroupItem_Data *data_region_fmt_example;
124 Evas_Object *chk_region;
126 char *region_keyStr[REGION_ITEM_MAX];
127 char *region_desc[REGION_ITEM_MAX];
128 int region_index[REGION_ITEM_MAX];
131 int gl_region_cur_index;
132 int selected_region_idx;
133 char *region_vconf_str;
134 Elm_Genlist_Item_Class itc_2text_2;
135 Elm_Genlist_Item_Class itc_bg_1icon;
136 UDateTimePatternGenerator *pattern_generator;
138 Elm_Object_Item *selected_item;
140 Evas_Object *pop_progress;
141 Evas_Object *search_bar;
142 char search_text[MAX_SEARCH_STR_LEN + 1];
143 Ecore_Idler *search_idler;
144 Ecore_Animator *animator;
147 /* extern setting_view setting_view_phone_main; */
148 extern setting_view setting_view_phone_language_region;
149 extern setting_view setting_view_phone_display_language;
150 extern setting_view setting_view_phone_region_format;
152 /* void setting_phone_lang_changed_cb(void *data); */
153 int app_terminate_dead_cb(int pid, void *data);
154 extern char *setting_phone_lang_get_region_str(const char *region);
155 extern char *setting_phone_lang_get_by_pattern(const char *locale,
156 const char *skeleton,
158 extern char *setting_phone_lang_get_example_desc(const char *region,
161 * Change language string to UTF8 format, the invoker need to free the return string
163 * @param unichars The source string will be translated.
165 * @return UTF8 format string.
167 extern char *setting_phone_lang_str_to_utf8(const UChar *unichars);
169 #endif /* __SETTING_PHONE_H__ */