Make TIZEN 2.0
[apps/home/call.git] / ui / src / include / vcui-app-data.h
1 /*
2  * Copyright 2012  Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.tizenopensource.org/license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17
18 #ifndef _VCUI_APP_DATA_H_
19 #define _VCUI_APP_DATA_H_
20
21 #include <ui-gadget.h>
22 #include "voice-call-engine.h"
23 #include "vcui-doc-launch.h"
24
25 #define TIME_END_START 1
26 #define TIME_END_NO      0
27 #define TIME_END_MAX_SHOW 8
28
29 #define MY_HANDLE 252
30 #define ALL_HANDLE 253
31 #define NO_HANDLE 254
32 #define NO_STATUS 254
33
34 #define WIN_HIDE 0
35 #define WIN_SHOW 1
36
37 typedef enum {
38         CALL_LOCK = 1,
39         CALL_UNLOCK
40 } vcui_app_lock_type_t;
41
42 typedef enum {
43         CALL_OUTGOING = 1,
44         CALL_INCOMING
45 } vcui_app_call_dirction_t;
46
47 typedef enum {
48         CALL_HOLD = 1,
49         CALL_UNHOLD
50 } vcui_app_call_status_t;
51
52 typedef enum {
53         VIEW_DIALLING_VIEW = 0,
54         VIEW_INCOMING_LOCK_VIEW,
55         VIEW_INCALL_ONECALL_VIEW,
56         VIEW_INCALL_MULTICALL_SPLIT_VIEW,
57         VIEW_INCALL_MULTICALL_CONF_VIEW,
58         VIEW_INCALL_MULTICALL_LIST_VIEW,
59         VIEW_ENDCALL_VIEW,
60         VIEW_QUICKPANEL_VIEW,
61         VIEW_MAX
62 } vcui_app_call_view_id_t;
63
64 typedef enum _vcui_snd_path_type_t {
65         VCUI_SND_PATH_NONE,
66         VCUI_SND_PATH_HEADSET,
67         VCUI_SND_PATH_RECEIVER_EARJACK,
68         VCUI_SND_PATH_SPEAKER,
69         VCUI_SND_PATH_MAX,
70 } vcui_snd_path_type_t;
71
72 typedef enum _vcui_vol_type_t {
73         VCUI_VOL_RING,
74         VCUI_VOL_VOICE,
75         VCUI_VOL_HEADSET,
76         VCUI_VOL_MAX
77 } vcui_vol_type_t;
78
79 typedef struct _appdata {
80         Evas *evas;
81         Evas_Object *win_main;
82
83         int root_w;     /**<Width of a root window */
84         int root_h;     /**<Height of a root window */
85
86         Evas_Coord touch_x;
87         Evas_Coord touch_y;
88
89         double scale_factor;
90
91         Evas_Object *actionslider;
92
93         Ecore_X_Window win;     /* key grab */
94         Ecore_X_Display *disp;  /* key grab */
95
96         Evas_Object *bg;
97
98         int full_image_type;
99         Evas_Object *full_image_eo;
100
101         int headset_status;
102         int speaker_status;
103         int mute_status;
104         int wbamr_status;
105
106         int show_flag;
107         int ball_view_hide;
108
109         struct _view_data *(*func_new[VIEW_MAX]) ();
110         struct _view_data *view_st[VIEW_MAX];
111         vcui_app_call_view_id_t view_top;
112         vcui_app_call_view_id_t view_before_top;
113
114         Ecore_Timer *popup_delay;
115
116         Evas_Object *popup_mw;
117         Evas_Object *popup_eo;
118         Evas_Object *popup_vol_ly;
119         Evas_Object *popup_progress_eo;
120         Evas_Object *ctxpopup_eo;
121         Evas_Object *ctxpopup_radio_group_eo;
122
123         int child_is;
124
125         /* for multi split view */
126         int bswapped;
127         int bholdisleft;
128
129         /* for one-call view */
130         int beffect_needed;
131
132         /* for keypad and UG*/
133         int beffect_show;
134         int badd_call_clicked;
135         int bcontact_clicked;
136
137         /* Volume Control */
138         int bmute_ringtone;
139         int vol_key_status;
140         int vol_longpress_cnt;
141
142         int ringtone_val;
143         int voice_vol_val;
144         int bt_vol_val;
145
146         Ecore_Timer *ringtone_longpress_mute_timer;
147         Ecore_Timer *volup_key_longpress_timer;
148         Ecore_Timer *voldown_key_longpress_timer;
149
150         Evas_Object *vol_ringtone_slider_eo;
151         Evas_Object *vol_ringtone_popup_eo;
152         Ecore_Timer *vol_ringtone_popup_del_timer;
153
154         Evas_Object *vol_voice_slider_eo;
155         Evas_Object *vol_voice_popup_eo;
156         Ecore_Timer *vol_voice_popup_del_timer;
157
158         Evas_Object *vol_bt_slider_eo;
159         Evas_Object *vol_bt_popup_eo;
160         Ecore_Timer *vol_bt_popup_del_timer;
161
162         ui_gadget_h contact_ug;
163         Evas_Object *ly;
164
165         struct vcui_ugs_array ugs_array_data;
166
167         int call_end_type;
168
169         Evas_Object *win_quickpanel;
170         Evas_Object *quickpanel_layout;
171         char *quickpanel_text;
172
173         Ecore_Event_Handler *downkey_handler;
174         Ecore_Event_Handler *upkey_handler;
175         Ecore_Event_Handler *mouse_evnt_handler;
176         Ecore_Event_Handler *focus_in;
177         Ecore_Event_Handler *focus_out;
178
179         int rotate_angle;
180         Ecore_Timer *ticker_tm;
181 } vcui_app_call_data_t;
182
183 typedef struct _view_data {
184         vcui_app_call_view_id_t type;
185         vcui_app_call_data_t *app_data;
186
187         int (*onCreate) (struct _view_data *view_data, int param1, void *param2, void *param3);
188         int (*onUpdate) (struct _view_data *view_data, void *update_data1, void *update_data2);
189         int (*onDestroy) (struct _view_data *view_data);
190         int (*onShow) (struct _view_data *view_data);
191         int (*onHide) (struct _view_data *view_data);
192
193         Evas_Object *layout;
194         void *priv;
195 } voice_call_view_data_t;
196
197 typedef struct _vcui_call_mo_data_t {
198         char call_number[VC_PHONE_NUMBER_LENGTH_MAX];
199         int ct_index;
200 } vcui_call_mo_data_t;
201
202 typedef struct _vcui_call_mt_data_t {
203         int call_handle;
204         int call_type;
205         int cli_presentation_indicator;
206         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
207         int calling_name_mode;
208         char calling_name[VC_PHONE_NAME_LENGTH_MAX];
209         char redirected_number[VC_PHONE_NUMBER_LENGTH_MAX];
210         char redirected_sub_address[VC_PHONE_SUBADDRESS_LENGTH_MAX];
211         int cli_cause;
212         int bfwded;
213         int active_line;
214 } vcui_call_mt_data_t;
215
216 typedef struct _vcui_call_ecc_data_t {
217         char call_number[VC_PHONE_NUMBER_LENGTH_MAX];
218 } vcui_call_ecc_data_t;
219
220 typedef struct _vcui_call_sat_data_t {
221         int command_id;                                                         /**<Proactive Command Number sent by USIM*/
222         int command_qualifier;                                          /**<call type*/
223         char disp_text[500 + 1];                                        /**<character data*/
224         char call_num[VC_PHONE_NUMBER_LENGTH_MAX];      /**<call number*/
225         unsigned int duration;                                          /**<maximum repeat duration*/
226 } vcui_call_sat_data_t;
227
228 #endif