4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@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 __SAT_UI_SUPPORT_H__
22 #define __SAT_UI_SUPPORT_H__
30 #include "../dtapi_common.h"
32 #define PKG_ID_SAT_UI "org.tizen.sat-ui"
33 #define PKG_ID_SAT_UI_2 "org.tizen.sat-ui-2"
35 #define RELAUNCH_INTERVAL 50*1000 //100ms
36 #define RETRY_MAXCOUNT 3
39 * @brief The structure type defining menu item info for the setup menu.
42 struct tel_sat_menu_info {
43 char itemString[SAT_DEF_ITEM_STR_LEN_MAX + 6]; /**< menu item character data */
44 char itemId; /**< identifies the item on the menu that user selected */
48 * @brief The structure type defining the icon data object.
51 struct tel_sat_icon_identifier_info {
52 int bIsPresent; /**< Flag for checking whether the icon identifier exists */
53 enum icon_qualifier iconQualifier; /**< Icon qualifier type */
54 unsigned char iconIdentifier; /**< Icon identifier */
55 struct tel_sat_icon iconInfo; /**< Icon info */
59 * @brief The structure type defining the icon identifier data object.
62 struct tel_sat_icon_identifier_list_info {
63 int bIsPresent; /**< Flag for checking whether the icon identifier exists */
64 enum icon_qualifier iconListQualifier; /**< Icon list qualifier */
65 unsigned char iconCount; /**< Icon count */
66 unsigned char iconIdentifierList[SAT_ICON_LIST_MAX_COUNT]; /**< Icon identifier list */
67 struct tel_sat_icon iconInfo[SAT_ICON_LIST_MAX_COUNT]; /**< Icon list info */
71 * @brief The structure type defining SAT main menu info.
74 struct tel_sat_setup_menu_info {
75 int commandId; /**< Proactive Command Number sent by USIM */
76 int bIsMainMenuPresent;
77 char satMainTitle[SAT_ALPHA_ID_LEN_MAX + 1]; /**< menu title text */
78 struct tel_sat_menu_info satMainMenuItem[SAT_MENU_ITEM_COUNT_MAX]; /**< menu items */
79 unsigned short satMainMenuNum; /**< number of menu items */
80 int bIsSatMainMenuHelpInfo; /**< flag for help information request */
81 int bIsUpdatedSatMainMenu;
82 struct tel_sat_icon_identifier_info iconId; /**< con Identifier */
83 struct tel_sat_icon_identifier_list_info iconIdList; /**< List of Icon Identifiers */
87 * @brief The structure type defining character data for the SAT engine data structure.
90 struct tel_sat_text_info {
91 unsigned short stringLen; /**< Character data length */
92 unsigned char string[SAT_TEXT_STRING_LEN_MAX + 1]; /**< Character data */
96 * @brief The structure type defining the display text proactive command for SAT UI.
99 struct tel_sat_display_text_ind {
100 int commandId; /**< Proactive Command Number sent by USIM */
101 struct tel_sat_text_info text; /**< Character data to display on screen */
102 unsigned int duration; /**< The duration of the display */
103 int bIsPriorityHigh; /**< Flag that indicates whether text is to be displayed if some other app is using the screen */
104 int bIsUserRespRequired; /**< Flag that indicates whether user response is required */
105 int b_immediately_resp; /**< TBD */
106 struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
110 * @brief The structure type defining the menu item data object.
113 struct tel_sat_menu_item_info {
114 unsigned char itemId; /**< Item identifier */
115 unsigned char textLen; /**< Text length */
116 unsigned char text[SAT_ITEM_TEXT_LEN_MAX + 1]; /**< Text information */
120 * @brief The structure type defining select item proactive command data for SAT UI.
123 struct tel_sat_select_item_ind {
124 int commandId; /**< Proactive Command Number sent by USIM */
125 int bIsHelpInfoAvailable; /**< Flag for a help information request */
126 struct tel_sat_text_info text; /**< Menu title text */
127 char defaultItemIndex; /**< Selected default item - default value is @c 0 */
128 char menuItemCount; /**< Number of menu items */
129 struct tel_sat_menu_item_info menuItem[SAT_MENU_ITEM_COUNT_MAX]; /**< Menu items */
130 struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
131 struct tel_sat_icon_identifier_list_info iconIdList; /**< List of Icon Identifiers */
135 * @brief The structure type defining get inkey proactive command data for SAT UI.
138 struct tel_sat_get_inkey_ind {
139 int commandId; /**< Proactive Command Number sent by USIM */
140 enum inkey_type keyType; /**< Input Type: Character Set or Yes/No */
141 enum input_alphabet_type inputCharMode; /**< Input character mode(SMS default, UCS2) */
142 int bIsNumeric; /**< Is input character numeric(0-9, *, # and +) */
143 int bIsHelpInfoAvailable; /**< Help info request flag */
144 struct tel_sat_text_info text; /**< Character data to display on the screen */
145 unsigned int duration; /**< Duration of the display */
146 struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
150 * @brief The structure type defining get input proactive command data for SAT UI.
153 struct tel_sat_get_input_ind {
154 int commandId; /**< Proactive Command Number sent by USIM */
155 enum input_alphabet_type inputCharMode; /**< Input character mode(SMS default, UCS2) */
156 int bIsNumeric; /**< Is input character numeric(0-9, *, # and +) */
157 int bIsHelpInfoAvailable; /**< Help info request flag */
158 int bIsEchoInput; /**< Flag that indicates whether to show input data on the screen */
159 struct tel_sat_text_info text; /**< Character data to display on the screen*/
160 struct tel_sat_response_length respLen; /**< Input data min, max length */
161 struct tel_sat_text_info defaultText; /**< Default input character data */
162 struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
166 * @brief The structure type defining refresh proactive command data for SAT UI.
169 struct tel_sat_refresh_ind_ui_info {
170 int commandId; /**< Proactive Command Number sent by USIM */
171 unsigned int duration; /**< Duration of the display */
172 enum tel_sim_refresh_command refreshType; /**< Refresh mode */
173 struct tel_sat_text_info text; /**< Character data to display on the screen */
174 struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
178 * @brief The structure type defining play tone proactive command data for an application.
181 struct tel_sat_play_tone_ind {
182 int commandId; /**< Proactive Command Number sent by USIM */
183 struct tel_sat_text_info text; /**< Character data to display on the screen */
184 struct tel_sat_tone tone; /**< Tone info */
185 unsigned int duration; /**< Duration for playing the tone */
186 struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
190 * @brief The structure type defining the setup idle mode text proactive command for the idle application.
193 struct tel_sat_setup_idle_mode_text_ind {
194 int commandId; /**< Proactive Command Number sent by USIM */
195 struct tel_sat_text_info text; /**< Character data to display on the screen */
196 struct tel_sat_icon_identifier_info iconId; /**< TBD */
200 * @brief The structure type defining data for SAT UI.
203 struct tel_sat_send_ui_info {
204 int commandId; /**< Proactive Command Number sent by USIM */
205 int user_confirm; /**< TBD */
206 struct tel_sat_text_info text; /**< Character data to display on the screen */
207 struct tel_sat_icon_identifier_info iconId; /**< Icon Identifier */
211 * @brief The structure type defining send SS proactive command data for the SS application.
214 struct tel_sat_send_ss_ind_ss_data {
215 int commandId; /**< Proactive Command Number sent by USIM */
216 enum tel_sim_ton ton; /**< Type of number */
217 enum tel_sim_npi npi; /**< Number plan identity */
218 unsigned short ssStringLen; /**< TBD */
219 unsigned char ssString[SAT_SS_STRING_LEN_MAX + 1]; /**< TBD */
223 * @brief The structure type defining send USSD proactive command data for the USSD application.
226 struct tel_sat_send_ussd_ind_ussd_data {
227 int commandId; /**< Proactive Command Number sent by USIM */
228 unsigned char rawDcs; /**< Data coding scheme */
229 unsigned short ussdStringLen; /**< TBD */
230 unsigned char ussdString[SAT_USSD_STRING_LEN_MAX + 1]; /**< TBD */
233 gboolean sat_ui_support_terminate_sat_ui(void);
234 gboolean sat_ui_check_app_is_running(const char* app_id);
235 gboolean sat_ui_support_launch_browser_application(enum tel_sat_proactive_cmd_type cmd_type,
236 GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
237 gboolean sat_ui_support_launch_ciss_application(enum tel_sat_proactive_cmd_type cmd_type,
238 GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
239 gboolean sat_ui_support_launch_setting_application(enum tel_sat_proactive_cmd_type cmd_type,
240 GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
241 gboolean sat_ui_support_launch_sat_ui(enum tel_sat_proactive_cmd_type cmd_type,
242 GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
243 gboolean sat_ui_support_exec_bip(GDBusConnection *connection,
244 const gchar *path, enum tel_sat_proactive_cmd_type cmd_type, GVariant *data);
245 gboolean sat_ui_support_storage_init(Server *server);
246 gboolean sat_ui_support_launch_eventdownloader_application(GVariant *data, enum dbus_tapi_sim_slot_id slot_id);
249 #endif /* __SAT_UI_SUPPORT_H__ */