98cd456baad7f693b1422d2655493897039cceb4
[framework/telephony/libtcore.git] / include / type / sat.h
1 /*
2  * libtcore
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  */
20
21 #ifndef __TYPE_SAT_H__
22 #define __TYPE_SAT_H__
23
24 __BEGIN_DECLS
25
26 #include <glib.h>
27 #include <type/sim.h>
28
29 #define SAT_DEF_TITLE_LEN_MAX 50 /**< max length for Menu Title */
30 #define SAT_DEF_ITEM_STR_LEN_MAX 50
31
32 #define SAT_TEXT_STRING_LEN_MAX 500
33 #define SAT_MENU_ITEM_COUNT_MAX 40
34 #define SAT_DIALING_NUMBER_LEN_MAX 200
35 #define SAT_SS_STRING_LEN_MAX 160
36 #define SAT_USSD_STRING_LEN_MAX 255
37 #define SAT_ALPHA_ID_LEN_MAX 255                /**<    max length of  alpha identifier         */
38 #define SAT_ITEM_TEXT_LEN_MAX 45                /**<    max length of item text                 */
39 #define SAT_SMS_TPDU_SMS_DATA_LEN_MAX 175
40 #define SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT 50     /**<   max count of items next action indication list  */
41 #define SAT_IMG_DATA_FILE_PATH_LEN_MAX 50        /**<   max length of image data file name (Icon, CLUT)         */
42 #define SAT_ICON_LIST_MAX_COUNT 50       /**<   max count of icon list          */
43 #define SAT_DTMF_STRING_LEN_MAX 30       /**<   max length of dtmf string               */
44 #define SAT_URL_LEN_MAX 129      /**<   max length of URL               */
45 #define SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT 50       /**<   max count of item text attributes list          */
46 #define SAT_EVENT_LIST_MAX      17      /**< max count of event list */
47 #define SAT_FILE_ID_LIST_MAX_COUNT 255
48 #define SAT_ENVELOPE_CMD_LEN_MAX 256
49 #define SAT_AID_LEN_MAX 128
50 #define SAT_SUB_ADDR_LEN_MAX 30
51 #define SAT_CCP_DATA_LEN_MAX 30  /**<   max length of ccp data          */
52 #define SAT_URL_LEN_MAX 129      /**<   max length of url               */
53 #define SAT_BEARER_LIST_MAX_COUNT 5      /**<   max count of bearer list                */
54 #define SAT_PROVISIONING_REF_MAX_COUNT 10       /**<    max count of sat provisioning reference */
55 #define SAT_PROVISIONING_FILE_PATH_LEN_MAX 50    /**<   max length of provisioning file path    */
56 #define SAT_BEARER_PARAMS_LEN_MAX 10     /**<   max length of bearer parameters                 */
57 #define SAT_OTHER_ADDR_LEN_MAX 30        /**<   max length of other address             */
58 #define SAT_NET_ACC_NAM_LEN_MAX 30       /**<   max length of net acc name              */
59 #define SAT_REMOTE_ENTITY_ADDR_LEN_MAX 50        /**<   max length of remote entity address     */
60 #define SAT_CHANNEL_DATA_STRING_LEN_MAX 255
61
62 enum tel_sat_proactive_cmd_type {
63         SAT_PROATV_CMD_NONE = 0x00, /**<        command type - None             */
64         SAT_PROATV_CMD_REFRESH = 0x01, /**<     command type - refresh          */
65         SAT_PROATV_CMD_MORE_TIME = 0x02, /**<   command type - more time                */
66         SAT_PROATV_CMD_SETUP_EVENT_LIST = 0x05, /**<    command type - setup event list                 */
67         SAT_PROATV_CMD_SETUP_CALL = 0x10, /**<  command type - setup call               */
68         SAT_PROATV_CMD_SEND_SS = 0x11, /**<     command type - send ss          */
69         SAT_PROATV_CMD_SEND_USSD = 0x12, /**<   command type - send ussd                */
70         SAT_PROATV_CMD_SEND_SMS = 0x13, /**<    command type - send sms                 */
71         SAT_PROATV_CMD_SEND_DTMF = 0x14, /**<   command type - send dtmf                */
72         SAT_PROATV_CMD_LAUNCH_BROWSER = 0x15, /**<      command type - launch browser           */
73         SAT_PROATV_CMD_PLAY_TONE = 0x20, /**<   command type - play tone                */
74         SAT_PROATV_CMD_DISPLAY_TEXT = 0x21, /**<        command type - display text             */
75         SAT_PROATV_CMD_GET_INKEY = 0x22, /**<   command type - get inkey                */
76         SAT_PROATV_CMD_GET_INPUT = 0x23, /**<   command type - get input                */
77         SAT_PROATV_CMD_SELECT_ITEM = 0x24, /**< command type - select item              */
78         SAT_PROATV_CMD_SETUP_MENU = 0x25, /**<  command type - setup menu               */
79         SAT_PROATV_CMD_PROVIDE_LOCAL_INFO = 0x26, /**<  command type - provide local info               */
80         SAT_PROATV_CMD_SETUP_IDLE_MODE_TEXT = 0x28, /**<        command type - setup idle mode text             */
81         SAT_PROATV_CMD_LANGUAGE_NOTIFICATION = 0x35, /**<       command type - language notification            */
82         SAT_PROATV_CMD_OPEN_CHANNEL = 0x40, /**<        command type - open channel -class e            */
83         SAT_PROATV_CMD_CLOSE_CHANNEL = 0x41, /**<       command type - close channel - class e          */
84         SAT_PROATV_CMD_RECEIVE_DATA = 0x42, /**<        command type - receive data -class e            */
85         SAT_PROATV_CMD_SEND_DATA = 0x43, /**<   command type - send data                */
86         SAT_PROATV_CMD_GET_CHANNEL_STATUS = 0x44, /**<  command type - get channel status -class e              */
87         SAT_PROATV_CMD_TYPE_END_PROACTIVE_SESSION = 0xFE,
88         SAT_PROATV_CMD_RESERVED = 0xFF /**<     command type - reserved         */
89 };
90
91 /*
92  * TS 102.223 V6.12.0
93  * SAT DATA OBJECT DEFINE
94  */
95
96 /*
97  * Data Coding Scheme Object
98  */
99 enum alphabet_format{
100         ALPHABET_FROMAT_SMS_DEFAULT = 0x00,
101         ALPHABET_FROMAT_8BIT_DATA = 0x01,
102         ALPHABET_FROMAT_UCS2 = 0x02,
103         ALPHABET_FROMAT_RESERVED = 0x03
104 };
105
106 enum msg_class{
107         MSG_CLASS_NONE =0x00,
108         MSG_CLASS_0 =0x01, //class 0
109         MSG_CLASS_1, // class 1 Default meaning:ME-specific
110         MSG_CLASS_2, // class 2 SIM specific message
111         MSG_CLASS_3, // class 3 Default meaning: TE specific
112         MSG_CLASS_RESERVED =0xFF
113 };
114
115 struct data_coding_scheme{
116         int is_compressed_format;               // if FALSE, unpacked format
117         enum alphabet_format a_format;
118         enum msg_class m_class;
119         unsigned char raw_dcs;
120 };
121
122 /*
123  * 8.1 Address
124  */
125 enum type_of_number{
126         TON_UNKNOWN = 0,                        /*< unknown */
127         TON_INTERNATIONAL = 1,          /*< international number */
128         TON_NATIONAL = 2,                       /*< national number */
129         TON_NETWORK_SPECIFIC = 3,       /*< network specific number */
130         TON_DEDICATED_ACCESS = 4,       /*< subscriber number */
131         TON_ALPHA_NUMERIC = 5,          /*< alphanumeric, GSM 7-bit default alphabet) */
132         TON_ABBREVIATED_NUMBER = 6,     /*< abbreviated number */
133         TON_RESERVED_FOR_EXT = 7        /*< reserved for extension */
134 };
135
136 enum numbering_plan_identifier{
137         NPI_UNKNOWN = 0,                                /*< Unknown */
138         NPI_ISDN_TEL = 1,                               /*< ISDN/Telephone numbering plan */
139         NPI_DATA_NUMBERING_PLAN = 3,    /*< Data numbering plan */
140         NPI_TELEX = 4,                                  /*< Telex numbering plan */
141         NPI_SVC_CNTR_SPECIFIC_PLAN = 5, /*< Service Center Specific plan */
142         NPI_SVC_CNTR_SPECIFIC_PLAN2 = 6,/*< Service Center Specific plan */
143         NPI_NATIONAL = 8,                               /*< National numbering plan */
144         NPI_PRIVATE = 9,                                /*< Private numbering plan */
145         NPI_ERMES_NUMBERING_PLAN = 10,  /*< ERMES numbering plan */
146         NPI_RESERVED_FOR_EXT = 0xF              /*< Reserved for extension */
147 };
148
149 struct tel_sat_address{
150         enum type_of_number ton;
151         enum numbering_plan_identifier npi;
152         int dialing_number_len;                                 /**< Dialing Number length */
153         char dialing_number[SAT_DIALING_NUMBER_LEN_MAX];        /**< Dialing Number*/
154 };
155
156 /*
157  * 8.2 Alpha identifier
158  */
159 struct tel_sat_alpha_identifier{
160         gboolean is_exist;
161         struct data_coding_scheme dcs;
162         unsigned char alpha_data_len; /**<      alpha identifier length                 */
163         char alpha_data[SAT_ALPHA_ID_LEN_MAX]; /**<     alpha identifier info   */
164 };
165
166 /*
167  * 8.3 Subaddress
168  */
169 struct tel_sat_subaddress{
170         int subaddress_len;
171         char subaddress[SAT_SUB_ADDR_LEN_MAX];
172 };
173
174 /*
175  * 8.4 Capability configuration parameters
176  */
177 struct tel_sat_ccp{
178         int data_len;
179         char data[SAT_CCP_DATA_LEN_MAX];
180 };
181
182 /*
183  * 8.6 Command details
184  */
185 enum display_text_priority{
186         TEXT_PRIORITY_NORMAL = 0,
187         TEXT_PRIORITY_HIGH = 1
188 };
189
190 enum display_text_clear_type{
191         TEXT_AUTO_CLEAR_MSG_AFTER_A_DELAY = 0,
192         TEXT_WAIT_FOR_USER_TO_CLEAR_MSG = 1
193 };
194
195 struct tel_sat_cmd_qualifier_display_text{
196         enum display_text_priority text_priority;
197         enum display_text_clear_type text_clear_type;
198 };
199
200 enum inkey_type{
201         INKEY_TYPE_CHARACTER_SET_ENABLED = 0,
202         INKEY_TYPE_YES_NO_REQUESTED = 1
203
204 };
205
206 enum input_alphabet_type{
207         INPUT_ALPHABET_TYPE_SMS_DEFAULT = 1,
208         INPUT_ALPHABET_TYPE_UCS2 = 2
209 };
210
211 struct tel_sat_cmd_qualifier_get_inkey{
212         enum inkey_type inkey_type;
213         enum input_alphabet_type alphabet_type;
214         gboolean alphabet_set;
215         gboolean immediate_rsp_required;
216         gboolean help_info;
217 };
218
219 struct tel_sat_cmd_qualifier_get_input{
220         enum input_alphabet_type alphabet_type;
221         gboolean alphabet_set;
222         gboolean me_echo_user_input;
223         gboolean user_input_unpacked_format;
224         gboolean help_info;
225 };
226
227 enum vibration_alert{
228         VIBRATE_ALERT_OPTIONAL = 0, /**<        VIBRATE ALERT UPTO THE TERMINAL         */
229         VIBRATE_ALERT_REQUIRED = 1 /**< VIBRATE, IF AVAILABLE, WITH TONE.               */
230 };
231
232 struct tel_sat_cmd_qualifier_play_tone{
233         enum vibration_alert vibration_alert;
234 };
235
236 enum refresh_command{
237         REFRESH_SIM_INIT_AND_FULL_FCN = 0, /**< command qualifier for REFRESH SIM INIT AND FULL FILE CHANGE_NOTIFICATION                */
238         REFRESH_FCN = 1, /**<   command qualifier for REFRESH FILE CHANGE NOTIFICATION          */
239         REFRESH_SIM_INIT_AND_FCN = 2, /**<      command qualifier for REFRESH SIM INIT AND FILE CHANGE NOTIFICATION             */
240         REFRESH_SIM_INIT = 3, /**<      command qualifier for REFRESH SIM INIT          */
241         REFRESH_SIM_RESET = 4, /**<     command qualifier for REFRESH SIM RESET         */
242         REFRESH_3G_APPLICATION_RESET = 5, /**<  command qualifier for REFRESH 3G APPLICATION RESET              */
243         REFRESH_3G_SESSION_RESET = 6, /**<      command qualifier for REFRESH 3G SESSION RESET          */
244         REFRESH_RESERVED = 0xFF /**<    command qualifier for REFRESH RESERVED          */
245 };
246
247 struct tel_sat_cmd_qualifier_refresh{
248         enum refresh_command refresh;
249 };
250
251 enum provide_local_info_command{
252         LOCAL_INFO_LOCATION = 0,
253         LOCAL_INFO_IMEI = 1,
254         LOCAL_INFO_NMR = 2,
255         LOCAL_INFO_DATE_TIME_AND_TIMEZONE = 3,
256         LOCAL_INFO_LANGUAGE = 4,
257         LOCAL_INFO_TIMING_ADVANCE = 5,
258         LOCAL_INFO_ACT = 6,
259         LOCAL_INFO_ESN = 7,
260         LOCAL_INFO_IMEISV = 8,
261         LOCAL_INFO_MEID = 0x0B,
262         LOCAL_INFO_RESERVED = 0xFF
263 };
264
265 struct tel_sat_cmd_qualifier_provide_local_info{
266         enum provide_local_info_command provide_local_info;
267 };
268
269 enum setup_call_command{
270         SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY = 0x00, /**<        command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY               */
271         SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL = 0x01, /**<    command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY WITH REDIAL           */
272         SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD = 0x02, /**<     command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD                */
273         SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD_WITH_REDIAL = 0x03, /**< command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD WITH REDIAL            */
274         SETUP_CALL_DISCONN_ALL_OTHER_CALLS = 0x04, /**< command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS          */
275         SETUP_CALL_DISCONN_ALL_OTHER_CALLS_WITH_REDIAL = 0x05, /**<     command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS WITH REDIAL              */
276         SETUP_CALL_RESERVED = 0xFF /**< command qualifier for SETUP CALL RESERVED               */
277 };
278
279 struct tel_sat_cmd_qualifier_setup_call{
280         enum setup_call_command setup_call;
281 };
282
283 enum presentation_type{
284         PRESENTATION_TYPE_NOT_SPECIFIED = 0x00,
285         PRESENTATION_TYPE_DATA_VALUE                    = 0x01,
286         PRESENTATION_TYPE_NAVIGATION_OPTION     = 0x02
287
288 };
289
290 enum selection_preference_type {
291         SELECTION_PREFERENCE_NONE_REQUESTED = 0,
292         SELECTION_PREFERENCE_USING_SOFT_KEY = 1
293 };
294
295 struct tel_sat_cmd_qualifier_select_item{
296         enum presentation_type presentation_type;
297         enum selection_preference_type select_preference;
298         gboolean help_info;
299 };
300
301 struct tel_sat_cmd_qualifier_send_sms{
302         gboolean packing_by_me_required;
303 };
304
305 struct tel_sat_cmd_qualifier_language_notification{
306         gboolean specific_language;
307 };
308
309 enum launch_browser_command{
310         LAUNCH_BROWSER_IF_NOT_ALREADY_LAUNCHED = 0, /**<        command qualifier for  LAUNCH BROWSER           */
311         LAUNCH_BROWSER_NOT_USED = 1, /**<       command qualifier for  NOT USED         */
312         LAUNCH_BROWSER_USE_EXISTING_BROWSER = 2, /**<   command qualifier for  USE EXISTING BROWSER if secure session, do not use it.           */
313         LAUNCH_BROWSER_CLOSE_AND_LAUNCH_NEW_BROWSER = 3, /**<   command qualifier for CLOSE AND LAUNCH NEW BROWSER              */
314         LAUNCH_BROWSER_NOT_USED2 = 4, /**<      command qualifier for  NOT USED2                */
315         LAUNCH_BROWSER_RESERVED = 0xFF /**<     reserved        */
316 };
317
318 struct tel_sat_cmd_qualifier_launch_browser{
319         enum launch_browser_command launch_browser;
320 };
321
322 struct tel_sat_cmd_qualifier_setup_menu{
323         enum selection_preference_type select_preference;
324         gboolean help_info;
325 };
326
327 struct tel_sat_cmd_qualifier_open_channel{
328         gboolean immediate_link;
329         gboolean automatic_reconnection;
330         gboolean background_mode;
331 };
332
333 struct tel_sat_cmd_qualifier_send_data{
334         gboolean send_data_immediately;
335 };
336
337 struct tel_sat_cmd_detail_info{
338         int cmd_num; /**< specific command number       */
339         enum tel_sat_proactive_cmd_type cmd_type; /**<  proactive command type          */
340         union {
341                 struct tel_sat_cmd_qualifier_display_text display_text;
342                 struct tel_sat_cmd_qualifier_get_inkey get_inkey;
343                 struct tel_sat_cmd_qualifier_get_input get_input;
344                 struct tel_sat_cmd_qualifier_play_tone play_tone;
345                 struct tel_sat_cmd_qualifier_setup_menu setup_menu; /**<        setup menu command qualifier info       */
346                 struct tel_sat_cmd_qualifier_select_item select_item;
347                 struct tel_sat_cmd_qualifier_send_sms send_sms;
348                 struct tel_sat_cmd_qualifier_setup_call setup_call;
349                 struct tel_sat_cmd_qualifier_refresh refresh;
350                 struct tel_sat_cmd_qualifier_provide_local_info provide_local_info;
351                 struct tel_sat_cmd_qualifier_language_notification language_notification;
352                 struct tel_sat_cmd_qualifier_launch_browser launch_browser;
353                 struct tel_sat_cmd_qualifier_open_channel open_channel;
354                 struct tel_sat_cmd_qualifier_send_data send_data;
355         }cmd_qualifier; /**<    Union   */
356 };
357
358 /*
359  * 8.7 Device identities
360  */
361 enum device_identity{
362         DEVICE_ID_KEYPAD = 0x01,
363         DEVICE_ID_DISPLAY = 0x02,
364         DEVICE_ID_EARPIECE = 0x03,
365         //21-27 for channel
366         DEVICE_ID_SIM = 0x81,
367         DEVICE_ID_ME = 0x82,
368         DEVICE_ID_NETWORK = 0x83,
369         DEVICE_ID_RESERVED = 0XFF
370 };
371
372 struct tel_sat_device_identities{
373         enum device_identity src;
374         enum device_identity dest;
375 };
376
377 /*
378  * 8.8 Duration
379  */
380 enum time_unit_type{
381         TIME_UNIT_MINUTES                                               = 0x0,
382         TIME_UNIT_SECONDS                                               = 0x01,
383         TIME_UNIT_TENTHS_OF_SECONDS                     = 0x02,
384         TIME_UNIT_RESERVED                                              = 0xFF
385 };
386
387 struct tel_sat_duration{
388         enum time_unit_type time_unit;
389         unsigned char time_interval;
390 };
391
392 /*
393  * 8.9 Item
394  */
395 struct tel_sat_item_info{
396         unsigned char item_id;
397         unsigned char text_len;
398         unsigned char text[SAT_ITEM_TEXT_LEN_MAX + 1];
399 };
400
401 /*
402  * 8.10 Item identifier
403  */
404 struct tel_sat_item_identifier{
405         unsigned char item_identifier;
406 };
407
408 /*
409  * 8.11 Response length
410  */
411 struct tel_sat_response_length{
412         unsigned char min;
413         unsigned char max;
414 };
415
416 /*
417  * 8.12 Result
418  */
419 enum tel_sat_result_type{
420         RESULT_SUCCESS = 0x0, /**<      command performed successfully */
421         RESULT_SUCCESS_WITH_PARTIAL_COMPREHENSION = 0x01, /**<  command performed with partial comprehension    */
422         RESULT_SUCCESS_WITH_MISSING_INFO = 0x02, /**<   command performed, with missing information     */
423
424         RESULT_REFRESH_PERFORMED_WITH_ADDITIONAL_EFS_READ = 0x03, /**<  REFRESH PERFORMED WITH ADDITIONAL EFS READ              */
425         RESULT_SUCCESS_BUT_REQUESTED_ICON_NOT_DISPLAYED = 0x04, /**<    command performed but REQUESTED ICON NOT DISPLAYED                      */
426         RESULT_SUCCESS_BUT_MODIFIED_BY_CALL_CONTROL_BY_SIM = 0x05, /**< command performed but MODIFIED BY CALL CONTROL BY SIM           */
427         RESULT_SUCCESS_LIMITED_SERVICE = 0x06, /**<     command performed with LIMITED SERVICE          */
428         RESULT_SUCCESS_WITH_MODIFICATION = 0x07, /**<   command performed with MODIFICATION             */
429         RESULT_REFRESH_PRFRMD_BUT_INDICATED_USIM_NOT_ACTIVE = 0x08, /**<        REFRESH PERFORMED BUT INDICATED USIM NOT ACTIVE                 */
430         RESULT_SUCCESS_BUT_TONE_NOT_PLAYED = 0x09, /**< command performed successfully, tone not played*/
431
432         RESULT_PROACTIVE_SESSION_TERMINATED_BY_USER = 0x10, /**<        proactive sim application session terminated by user            */
433         RESULT_BACKWARD_MOVE_BY_USER = 0x11, /**<       backward move in the proactive sim application session request by the user              */
434         RESULT_NO_RESPONSE_FROM_USER = 0x12, /**<       no response from user           */
435
436         RESULT_HELP_INFO_REQUIRED_BY_USER = 0x13, /**<  HELP INFO REQUIRED BY USER              */
437         RESULT_USSD_OR_SS_TRANSACTION_TERMINATED_BY_USER = 0x14, /**<   USSD OR SS TRANSACTION TERMINATED BY USER       */
438
439         RESULT_ME_UNABLE_TO_PROCESS_COMMAND = 0x20, /**<        ME currently unable to process command          */
440         RESULT_NETWORK_UNABLE_TO_PROCESS_COMMAND = 0x21, /**<   Network currently unable to process command             */
441         RESULT_USER_DID_NOT_ACCEPT_CALL_SETUP_REQ = 0x22, /**<  User did not accept call setup request          */
442         RESULT_USER_CLEAR_DOWN_CALL_BEFORE_CONN = 0x23, /**<    User cleared down call before connection or network released            */
443
444         RESULT_INTERACTION_WITH_CC_BY_SIM_IN_TMP_PRBLM = 0x25, /**<     INTERACTION WITH CALL CONTROL BY SIM IN TEMPORARY PROBLEM               */
445         RESULT_LAUNCH_BROWSER_GENERIC_ERROR_CODE = 0x26, /**<   LAUNCH BROWSER GENERIC ERROR CODE               */
446
447         RESULT_BEYOND_ME_CAPABILITIES = 0x30, /**<      command beyond ME's capabilities                */
448         RESULT_COMMAND_TYPE_NOT_UNDERSTOOD_BY_ME = 0x31, /**<   command type not understood by ME               */
449         RESULT_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME = 0x32, /**<   command data not understood by ME               */
450         RESULT_COMMAND_NUMBER_NOT_KNOWN_BY_ME = 0x33, /**<      command number not known by ME          */
451         RESULT_SS_RETURN_ERROR = 0x34, /**<     SS return error         */
452         RESULT_SMS_RP_ERROR = 0x35, /**<        SMS rp-error            */
453         RESULT_ERROR_REQUIRED_VALUES_ARE_MISSING = 0x36, /**<   Error, required values are missing              */
454
455         RESULT_USSD_RETURN_ERROR = 0x37, /**<   USSD_RETURN_ERROR               */
456         RESULT_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM = 0x39, /**<     INTERACTION WITH CALL CONTROL OR SMS CONTROL PERMANENT PROBLEM          */
457         RESULT_BEARER_INDEPENDENT_PROTOCOL_ERROR = 0x3A, /**<   BEARER INDEPENDENT PROTOCOL ERROR               */
458         RESULT_FRAMES_ERROR = 0x3C /**< FRAMES ERROR            */
459 };
460
461 enum tel_sat_me_problem_type{
462         ME_PROBLEM_NO_SPECIFIC_CAUSE = 0x0, /**<        ME problem with NO SPECIFIC CAUSE               */
463         ME_PROBLEM_SCREEN_BUSY = 0x01, /**<     ME problem with SCREEN BUSY             */
464         ME_PROBLEM_ME_BUSY_ON_CALL = 0x02, /**< ME problem with ME BUSY ON CALL         */
465         ME_PROBLEM_ME_BUSY_ON_SS = 0x03, /**<   ME problem with ME_BUSY ON SS           */
466         ME_PROBLEM_NO_SERVICE = 0x04, /**<      ME problem with NO SERVICE              */
467         ME_PROBLEM_ACCESS_CONTROL_CLASS_BAR = 0x05, /**<        ME problem with ACCESS CONTROL CLASS BAR                */
468         ME_PROBLEM_RADIO_RES_NOT_GRANTED = 0x06, /**<   ME problem with RADIO RES NOT GRANTED           */
469         ME_PROBLEM_NOT_IN_SPEECH_CALL = 0x07, /**<      ME problem with NOT IN SPEECH CALL      */
470         ME_PROBLEM_ME_BUSY_ON_USSD = 0x08, /**< ME problem with ME BUSY ON USSD         */
471         ME_PROBLEM_ME_BUSY_ON_SEND_DTMF_CMD = 0x09, /**<        ME problem with ME BUSY ON SEND DTMF CMD        */
472         ME_PROBLEM_NO_USIM_ACTIVE = 0x0A, /**<  ME problem with NO USIM ACTIVE          */
473         ME_PROBLEM_INVALID = 0xFF /**<  ME problem with INVALID                 */
474 };
475
476 enum tel_sat_user_confirm_type{
477         USER_CONFIRM_YES,                                               /**<This Enum Informs That user confirms yes */
478         USER_CONFIRM_NO_OR_CANCEL,                              /**<This enum informs that user confirms no/cancel */
479         USER_CONFIRM_HELP_INFO,                         /**<This enum informs that user wants help information */
480         USER_CONFIRM_END,                                               /**<This enum informs that user confirms end */
481         USER_CONFIRM_TIMEOUT,                                   /**<This enum informs that user did not respond */
482 };
483
484 enum tel_sat_call_ctrl_problem_type{
485         CC_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**<  Call Control problem with no specific cause             */
486         CC_PROBLEM_ACTION_NOT_ALLOWED = 1, /**< Call Control problem with action not allowed    */
487         CC_PROBLEM_REQUEST_TYPE_HAS_CHANGED = 2 /**<    Call Control problem with request type has changed      */
488 };
489
490 enum ss_problem_type{
491         SATK_SS_PROBLEM_NO_SPECIFIC_CAUSE                       = 0,
492         SATK_SS_PROBLEM_FACILITY_NOT_SUPPORTED          = 0x15
493 };
494
495 enum ussd_problem_type{
496         SATK_USSD_PROBLEM_NO_SPECIFIC_CAUSE                     = 0,
497         SATK_USSD_PROBLEM_UNKNOWN_ALPHABET                      = 0x47
498 };
499
500 enum network_problem_type{
501         NETWORK_PROBLEM_NO_SPECIFIC_CAUSE = 0x0, /**<   Network problem with no specific cause          */
502         NETWORK_PROBLEM_USER_BUSY = 0x91 /**<   Network problem with USER BUSY          */
503 };
504
505 enum browser_problem_type{
506         BROWSER_PROBLEM_NO_SPECIFIC_CAUSE = 0, /**<     Browser problem with no specific cause          */
507         BROWSER_PROBLEM_BEARER_UNAVAILABLE = 1, /**<    Browser problem with bearer unavailable         */
508         BROWSER_PROBLEM_BROWSER_UNAVAILABLE = 2, /**<   Browser problem with browser unavailable                */
509         BROWSER_PRBLM_ME_UNABLE_TO_READ_PROV_DATA = 3 /**<      Browser problem with ME unable to read provisioning data                */
510 };
511
512 enum bip_problem_type{
513         BIP_PROBLEM_NO_SPECIFIC_CAUSE = 0x00, /**<      BIP problem with no specific cause      */
514         BIP_PROBLEM_NO_CHANNEL_AVAILABLE = 0x01, /**<   BIP problem with no channel available           */
515         BIP_PROBLEM_CHANNEL_CLOSED = 0x02, /**< BIP problem with channel closed                 */
516         BIP_PROBLEM_CHANNEL_ID_NOT_VALID = 0x03, /**<   BIP problem with channel id not valid           */
517         BIP_PROBLEM_BUF_SIZE_NOT_AVAILABLE = 0x04, /**< BIP problem with buffer size not available              */
518         BIP_PROBLEM_SECURITY_ERROR = 0x05, /**< BIP problem with security error                 */
519         BIP_PRBLM_SIM_ME_IF_TRNSPRT_LEVEL_NOT_AVL = 0x06, /**<  BIP problem with SIM ME interface transport level not available         */
520         BIP_REMOTE_DEV_NOT_REACHABLE = 0x07, /**<       BIP problem with remote device not reachable            */
521         BIP_SERVICE_ERROR = 0x08, /**<  BIP service error               */
522         BIP_SERVICE_IDENTIFIER_UNKNOWN = 0x09 /**<      BIP service identifier unknown          */
523 };
524
525 /*
526  * 8.13 3GPP SMS TPDU
527  */
528 enum sms_tpdu_type{
529         SMS_TPDU_TYPE_DELIVER_TPDU      = 0,
530         SMS_TPDU_TYPE_DELIVER_RPT       = 1,
531         SMS_TPDU_TYPE_SUBMIT_TPDU       = 2,
532         SMS_TPDU_TYPE_SUBMIT_RPT        = 3,
533         SMS_TPDU_TYPE_STATUS_RPT        = 4,
534         SMS_TPDU_TYPE_TPDU_CMD          = 5
535 };
536
537 struct tel_sat_sms_tpdu{
538         enum sms_tpdu_type tpdu_type;
539         int data_len;
540         char data[SAT_SMS_TPDU_SMS_DATA_LEN_MAX];
541 };
542
543 /*
544  * 8.14 SS string
545  */
546 struct tel_sat_ss_string{
547         enum type_of_number ton;
548         enum numbering_plan_identifier npi;
549         unsigned char string_len;                                       /**< SS string length */
550         char ss_string[SAT_SS_STRING_LEN_MAX];  /**< SS stringr*/
551 };
552
553 /*
554  * 8.15 Text string
555  */
556 struct tel_sat_text_string_object{
557         int is_digit_only;
558         struct data_coding_scheme dcs;
559         int string_length;
560         char string[SAT_TEXT_STRING_LEN_MAX+1];
561 };
562
563 /*
564  * 8.16 TONE
565  */
566 enum tone_type{
567         // standard supervisory tones
568         DIAL_TONE = 0x01, /**<  TONE TYPE DIAL TONE             */
569         CALLED_SUBSCRIBER_BUSY = 0x02, /**<     TONE TYPE CALLED SUBSCRIBER BUSY                */
570         CONGESTION = 0x03, /**< TONE TYPE CONGESTION    */
571         RADIO_PATH_ACK = 0x04, /**<     TONE TYPE RADIO PATH ACK        */
572         RADIO_PATH_NOT_AVAILABLE_CALL_DROPPED = 0x05, /**<      TONE TYPE RADIO PATH NOT AVAILABLE CALL DROPPED */
573         ERR_SPECIAL_INFO = 0x06, /**<   TONE TYPE ERR SPECIAL INFO      */
574         CALL_WAITING_TONE = 0x07, /**<  TONE TYPE CALL WAITING TONE             */
575         RINGING_TONE = 0x08, /**<       TONE TYPE RINGING TONE  */
576
577         // ME proprietary tones
578         GENERAL_BEEP = 0x10, /**<       TONE TYPE GENERAL BEEP          */
579         POSITIVE_ACK_TONE = 0x11, /**<  TONE TYPE POSITIVE ACK TONE             */
580         NEGATIVE_ACK_OR_ERROR_TONE = 0x12, /**< TONE TYPE NEGATIVE ACK OR ERROR TONE            */
581         RINGING_TONE_SLCTD_BY_USR_FOR_INCOM_SPEECH_CALL = 0x13, /**<    TONE TYPE RINGING TONE SELECTED BY USER FOR INCOMING SPEECH CALL                */
582         ALERT_TONE_SELECTED_BY_USER_FOR_INCOMING_SMS = 0x14, /**<       TONE TYPE ALERT TONE SELECTED BY USER FOR INCOMING SMS          */
583         CRITICAL_ALERT = 0x15, /**<     TONE TYPE CRITICAL ALERT                */
584
585         //Themed tones
586         HAPPY_TONE = 0x30, /**< TONE TYPE HAPPY TONE            */
587         SAD_TONE = 0x31, /**<   TONE TYPE SAD TONE                      */
588         URGENT_ACTION_TONE = 0x32, /**< TONE TYPE URGENT ACTION TONE            */
589         QUESTION_TONE = 0x33, /**<      TONE TYPE QUESTION TONE                 */
590         MESSAGE_RECEIVED_TONE = 0x34, /**<      TONE TYPE MESSAGE RECEIVED TONE                 */
591
592         //Melody tones
593         MELODY_1 = 0x40, /**<   TONE TYPE MELODY 1              */
594         MELODY_2 = 0x41, /**<   TONE TYPE MELODY 2              */
595         MELODY_3 = 0x42, /**<   TONE TYPE MELODY 3              */
596         MELODY_4 = 0x43, /**<   TONE TYPE MELODY 4              */
597         MELODY_5 = 0x44, /**<   TONE TYPE MELODY 5              */
598         MELODY_6 = 0x45, /**<   TONE TYPE MELODY 6              */
599         MELODY_7 = 0x46, /**<   TONE TYPE MELODY 7              */
600         MELODY_8 = 0x47, /**<   TONE TYPE MELODY 8              */
601
602         TONE_TYPE_RESERVED = 0xFF /**<  TONE TYPE RESERVED              */
603 };
604
605 struct tel_sat_tone{
606         enum tone_type tone_type;
607 };
608
609 /*
610  * 8.17 USSD string
611  */
612 struct tel_sat_ussd_string{
613         struct data_coding_scheme dsc;
614         unsigned char string_len;                                       /**< USSD string length */
615         char ussd_string[SAT_USSD_STRING_LEN_MAX];      /**< USSD stringr*/
616 };
617
618 /*
619  * 8.18 File List
620  */
621 /* use enum tel_sim_file_id in sim.h*/
622
623 struct tel_sat_file_list{
624         int file_count;
625         enum tel_sim_file_id file_id[SAT_FILE_ID_LIST_MAX_COUNT];
626 };
627
628 /*
629  * 8.19 Location information
630  */
631 struct tel_sat_location_information{
632         char mcc[3+1];
633         char mnc[3+1];
634         char lac [4+1];
635         char cell_id[4+1];
636         char extended_cell_id[4+1];
637 };
638
639 /*
640  * 8.20 IMEI
641  */
642 struct tel_sat_imei{
643         char imei[8+1]; // length is defined by 8 in TS 102 223
644 };
645
646 /*
647  * 8.22 Network measurement results
648  */
649 struct tel_sat_network_measurement_results{
650         char nmr[10+1]; // length is defined by 10 in TS 102 223
651 };
652
653 /*
654  * 8.23 Default text
655  * It is the same as Text string(8.15)
656  */
657
658 /*
659  * 8.24 Items next action indicator
660  */
661 struct tel_sat_item_next_action_indicatior_list{
662         unsigned char cnt;
663         unsigned char indicator_list[SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT];
664 };
665
666 /*
667  * 8.25 Event list
668  */
669 enum event_list{
670         EVENT_MT_CALL = 0,
671         EVENT_CALL_CONNECTED = 1,
672         EVENT_CALL_DISCONNECTED = 2,
673         EVENT_LOCATION_STATUS = 3,
674         EVENT_USER_ACTIVITY = 4, /**<   data download type - USER_ACTIVITY              */
675         EVENT_IDLE_SCREEN_AVAILABLE = 5, /**<   data download type - IDLE SCREEN AVAILABLE              */
676         EVENT_CARD_READER_STATUS = 6,
677         EVENT_LANGUAGE_SELECTION = 7, /**<      data download type - LANGUAGE SELECTION         */
678         EVENT_BROWSER_TERMINATION = 8, /**<     data download type - BROWSER TERMINATION                */
679         EVENT_DATA_AVAILABLE = 9, /**<  data download type -DATA AVAILABLE              */
680         EVENT_CHANNEL_STATUS = 0x0A, /**<       data download type - CHANNEL STATUS             */
681         EVENT_ACCESS_TECHNOLOGY_CHANGED = 0x0B,
682         EVENT_DISPLAY_PARAMETERS_CHANGED = 0x0C,
683         EVENT_LOCAL_CONNECTION = 0x0D,
684         EVENT_NW_SEARCH_MODE_CHANGED = 0X0E,
685         EVENT_BROWSING_STATUS = 0X0F,
686         EVENT_FRAMES_INFORMATION_CHANGED = 0X10,
687         EVENT_RESERVED_FOR_3GPP = 0X11,
688         EVENT_UNKNOWN = 0xFF /**<       data download type - unknown            */
689 };
690
691 struct tel_sat_event_list{
692         int event_list_cnt;
693         enum event_list evt_list[SAT_EVENT_LIST_MAX];
694 };
695
696 /*
697  * 8.42 BC repeat indicator
698  */
699 enum bc_repeat_indi_type{
700         BC_REPEAT_INDI_ALTERNATE_MODE = 0x01, /**<      BC REPEAT ALTERNATE MODE                */
701         BC_REPEAT_INDI_SEQUENTIAL_MODE = 0x03, /**<     BC REPEAT SEQUENTIAL MODE               */
702         BC_REPEAT_INDI_RESERVED = 0xFF /**<     RESERVED        */
703 };
704
705 struct tel_sat_repeat_indicator_type{
706         enum bc_repeat_indi_type bc_indi_repeat_type;
707 };
708
709 /*
710  * 8.30 Call control requested action
711  */
712 struct tel_sat_call_ctrl_req_action{
713         struct tel_sat_address address;
714         struct tel_sat_ccp ccp1;
715         struct tel_sat_subaddress sub_address;
716         struct tel_sat_alpha_identifier alpha_id;
717         struct tel_sat_repeat_indicator_type bc_repeat_type;
718         struct tel_sat_ccp ccp2;
719 };
720
721 /*
722  * 8.31 Icon identifier
723  */
724 enum img_coding_scheme{
725         IMAGE_CODING_SCHEME_BASIC = 0x11,
726         IMAGE_CODING_SCHEME_COLOUR = 0x21,
727         IMAGE_CODING_SCHEME_RESERVED = 0xFF
728 };
729
730 enum icon_qualifier{
731         ICON_QUALI_SELF_EXPLANATORY = 0,
732         ICON_QUALI_NOT_SELF_EXPLANATORY = 1,
733         ICON_QUALI_RESERVED = 0xFF
734 };
735
736 struct tel_sat_icon{
737         unsigned char width;
738         unsigned char height;
739         enum img_coding_scheme ics;
740         unsigned short icon_data_len;
741         unsigned short clut_data_len;
742         char icon_file[SAT_IMG_DATA_FILE_PATH_LEN_MAX];
743         char clut_file[SAT_IMG_DATA_FILE_PATH_LEN_MAX];
744 };
745
746 struct tel_sat_icon_identifier{
747         gboolean is_exist;
748         enum icon_qualifier icon_qualifer;
749         unsigned char icon_identifier;
750         struct tel_sat_icon icon_info;
751 };
752
753 /*
754  * 8.32 Item icon identifier next_action_indicator_list
755  */
756 struct tel_sat_icon_identifier_list{
757         gboolean is_exist;
758         enum icon_qualifier icon_qualifer;
759         unsigned char icon_cnt;
760         unsigned char icon_id_list[SAT_ICON_LIST_MAX_COUNT];
761         struct tel_sat_icon icon_info[SAT_ICON_LIST_MAX_COUNT];
762 };
763
764 /*
765  * 8.39 date, time and timezone
766  */
767 struct tel_sat_date_time_and_timezone{
768         unsigned char year; /**<        year    */
769         unsigned char month; /**<       month   */
770         unsigned char day; /**< day     */
771         unsigned char hour; /**<        hour    */
772         unsigned char minute; /**<      minute  */
773         unsigned char second; /**<      second  */
774         unsigned char timeZone; /**<    timeZone        */
775 };
776
777 /*
778  * 8.44 DTMF string
779  */
780 struct tel_sat_dtmf_string{
781         int dtmf_length;
782         char dtmf_string[SAT_DTMF_STRING_LEN_MAX];
783 };
784
785 /*
786  * 8.45 Language
787  */
788 /*
789  * Refer enum tel_sim_language_type in sim.h
790  */
791
792 /*
793  * 8.47 Browser Identity
794  */
795 enum browser_identity{
796         BROWSER_ID_DEFAULT = 0, /**<    DEFAULT BROWSER                 */
797         BROWSER_ID_WML, /**<    BROWSER WML     */
798         BROWSER_ID_HTML, /**<   BROWSER HTML    */
799         BROWSER_ID_XHTML, /**<  BROWSER XHTML   */
800         BROWSER_ID_CHTML, /**<  BROWSER CHTML   */
801         BROWSER_ID_RESERVED = 0xFF /**< RESERVED        */
802 };
803
804 /*
805  * 8.48 URL
806  * URL shall be coded as defined in RFC 1738 on using the "SMS 7bit default alphabet" with bit 8 set to 0.
807  */
808 struct tel_sat_url{
809         int url_length;
810         char url[SAT_URL_LEN_MAX];
811 };
812
813 /*
814  * 8.49 Bear
815  */
816 enum bearer_list_type{
817         BEARER_LIST_SMS = 0, /**<       BEARER SMS              */
818         BEARER_LIST_CSD = 1, /**<       BEARER CSD              */
819         BEARER_LIST_USSD = 2, /**<      BEARER USSD             */
820         BEARER_LIST_GPRS = 3, /**<      BEARER GPRS             */
821         BEARER_LIST_RESERVED = 0xFF /**<        BEARER RESERVED         */
822 };
823
824 struct tel_sat_bearer_list{
825         int count;
826         enum bearer_list_type bear[6];
827 };
828
829 /*
830  * 8.50 Provisioning file reference
831  */
832 struct tel_sat_provisioning_file_ref{
833         int file_path_length;
834         char file_path[SAT_PROVISIONING_FILE_PATH_LEN_MAX];
835 };
836
837
838 /*
839  * 8.51 Browser termination cause
840  */
841 enum browser_termination_cause{
842         BROWSER_TERMINATED_BY_USER = 0, /**<    BROWSER TERMINATED BY USER              */
843         BROWSER_TERMINATED_BY_ERROR = 1, /**<   BROWSER TERMINATED BY ERROR             */
844 };
845
846 /*
847  * 8.52 Bearer description
848  */
849 enum bearer_type{
850         BEARER_CSD = 0x1, /**<  BEARER DESC CSD                 */
851         BEARER_GPRS = 0x2, /**< BEARER DESC GPRS                */
852         BEARER_DEFAULT_BEARER_FROM_TRANSPORT_LAYER = 0x3, /**<  BEARER DESC DEFAULT BEARER FROM TRANSPORT LAYER         */
853         BEARER_LOCAL_LINK_TECHNOLOGY_INDEPENDENT = 0x4, /**<    BEARER DESC LOCAL LINK TECHNOLOGY INDEPENDENT           */
854         BEARER_BLUETOOTH = 0x5, /**<    BEARER DESC BLUETOOTH   */
855         BEARER_IrDA = 0x6, /**< BEARER DESC IrDA        */
856         BEARER_RS232 = 0x7, /**<        BEARER DESC RS232       */
857         BEARER_USB = 0x10, /**< BEARER DESC USB */
858         BEARER_RESERVED = 0xFF /**<     RESERVED        */
859 };
860
861 enum bearer_param_cs_data_rate{
862         BIP_DR_AUTOBAUDING = 0, /**<    CSD data rate - AUTOBAUDING             */
863         BIP_DR_300BPS_V21 = 1, /**<     CSD data rate -300BPS V21               */
864         BIP_DR_1200BPS_V22 = 2, /**<    CSD data rate - 1200BPS V22             */
865         BIP_DR_1200_75BPS_V23 = 3, /**< CSD data rate -1200 75BPS V23                   */
866         BIP_DR_2400BPS_V22 = 4, /**<    CSD data rate -2400BPS V22              */
867         BIP_DR_2400BPS_V26 = 5, /**<    CSD data rate - 2400BPS V26                     */
868         BIP_DR_4800BPS_V32 = 6, /**<    CSD data rate - 4800BPS V32             */
869         BIP_DR_9600BPS_V32 = 7, /**<    CSD data rate - 9600BPS V32             */
870         BIP_DR_9600BPS_V34 = 12, /**<   CSD data rate - 9600BPS_V34             */
871         BIP_DR_14400BPS_V34 = 14, /**<  CSD data rate -14400BPS V34             */
872         BIP_DR_19200BPS_V34 = 15, /**<  CSD data rate -19200BPS V34             */
873         BIP_DR_28800BPS_V34 = 16, /**<  CSD data rate -28800BPS V34             */
874         BIP_DR_33600BPS_V34 = 17, /**<  CSD data rate -33600BPS V34             */
875         BIP_DR_1200BPS_V120 = 34, /**<  CSD data rate -1200BPS V120             */
876         BIP_DR_2400BPS_V120 = 36, /**<  CSD data rate -2400BPS V120             */
877         BIP_DR_4800BPS_V120 = 38, /**<  CSD data rate -4800BPS V120             */
878         BIP_DR_9600BPS_V120 = 39, /**<  CSD data rate -9600BPS V120             */
879         BIP_DR_14400BPS_V120 = 43, /**< CSD data rate -14400BPS V120            */
880         BIP_DR_19200BPS_V120 = 47, /**< CSD data rate -19200BPS V120            */
881         BIP_DR_28800BPS_V120 = 48, /**< CSD data rate -28800BPS V120            */
882         BIP_DR_38400BPS_V120 = 49, /**< CSD data rate -38400BPS V120            */
883         BIP_DR_48000BPS_V120 = 50, /**< CSD data rate -48000BPS V120            */
884         BIP_DR_56000BPS_V120 = 51, /**< CSD data rate -56000BPS V120            */
885         BIP_DR_300BPS_V110 = 65, /**<   CSD data rate - 300BPS V110             */
886         BIP_DR_1200BPS_V110 = 66, /**<  CSD data rate -1200BPS V110             */
887         BIP_DR_2400BPS_V110_OR_X31_FALG_STUFFING = 68, /**<     CSD data rate - 2400BPS V110 OR X31 FALG STUFFING               */
888         BIP_DR_4800BPS_V110_OR_X31_FALG_STUFFING = 70, /**<     CSD data rate - 4800BPS V110 OR X31 FALG STUFFING               */
889         BIP_DR_9600BPS_V110_OR_X31_FALG_STUFFING = 71, /**<     CSD data rate - 9600BPS V110 OR X31 FALG STUFFING               */
890         BIP_DR_14400BPS_V110_OR_X31_FALG_STUFFING = 75, /**<    CSD data rate - 14400BPS V110 OR X31 FALG STUFFING              */
891         BIP_DR_19200BPS_V110_OR_X31_FALG_STUFFING = 79, /**<    CSD data rate -19200BPS V110 OR X31 FALG STUFFING               */
892         BIP_DR_28800BPS_V110_OR_X31_FALG_STUFFING = 80, /**<    CSD data rate -28800BPS V110 OR X31 FALG STUFFING               */
893         BIP_DR_38400BPS_V110_OR_X31_FALG_STUFFING = 81, /**<    CSD data rate -38400BPS V110 OR X31 FALG STUFFING               */
894         BIP_DR_48000BPS_V110_OR_X31_FALG_STUFFING = 82, /**<    CSD data rate -48000BPS V110 OR X31 FALG STUFFING               */
895         BIP_DR_56000BPS_V110_OR_X31_FALG_STUFFING = 83, /**<    CSD data rate -56000BPS V110 OR X31 FALG STUFFING               */
896         BIP_DR_64000BPS = 84, /**<      CSD data rate -64000BPS                 */
897         BIP_DR_56000BPS_BIT_TRANSPERENT = 115, /**<     CSD data rate -56000BPS BIT TRANSPERENT                 */
898         BIP_DR_64000BPS_BIT_TRANSPERENT = 116, /**<     CSD data rate -64000BPS BIT TRANSPERENT                 */
899         BIP_DR_32000BPS_PIAFS32K = 120, /**<    CSD data rate -32000BPS PIAFS32K                */
900         BIP_DR_64000BPS_PIAFS64K = 121, /**<    CSD data rate - 64000BPS PIAFS64K               */
901         BIP_DR_28800BPS_MULTIMEDIA = 130, /**<  CSD data rate -28800BPS MULTIMEDIA              */
902         BIP_DR_32000BPS_MULTIMEDIA = 131, /**<  CSD data rate -32000BPS MULTIMEDIA              */
903         BIP_DR_33600BPS_MULTIMEDIA = 132, /**<  CSD data rate - 33600BPS MULTIMEDIA             */
904         BIP_DR_56000BPS_MULTIMEDIA = 133, /**<  CSD data rate -56000BPS MULTIMEDIA              */
905         BIP_DR_64000BPS_MULTIMEDIA = 134 /**<   CSD data rate -64000BPS MULTIMEDIA              */
906 };
907
908 enum bearer_param_cs_service_type{
909         BIP_CSD_BS_DATA_CIRCUIT_ASYNC_UDI = 0, /**<     CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS UDI              */
910         BIP_CSD_BS_DATA_CIRCUIT_SYNC = 1, /**<  CSD Bearer service - DATA CIRCUIT SYNCHRONOUS UDI               */
911         BIP_CSD_BS_PAD_ACCESS_ASYNC_UDI = 2, /**<       CSD Bearer service - PAD ACCESS ASYNCHRONOUS UDI                        */
912         BIP_CSD_BS_PACKET_ACCESS_SYNC = 3, /**< CSD Bearer service - PACKET ACCESS SYNCHRONOUS UDI              */
913         BIP_CSD_BS_DATA_CIRCUIT_ASYNC_RDI = 4, /**<     CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS RDI              */
914         BIP_CSD_BS_DATA_CIRCUIT_SYNC_RDI = 5, /**<      CSD Bearer service - DATA CIRCUIT SYNCHRONOUS RDI               */
915         BIP_CSD_BS_PAD_ACCESS_ASYNC_RDI = 6, /**<       CSD Bearer service - PAD ACCESS ASYNCHRONOUS RDI                */
916         BIP_CSD_BS_PACKET_ACCESS_SYNC_RDI = 7 /**<      CSD Bearer service - PACKET ACCESS SYNCHRONOUS RDI              */
917 };
918
919 enum bearer_param_cs_connection_element_type{
920         BIP_CSD_CONN_ELEM_TRANSPARENT = 0, /**< CSD connection element - TRANSPARENT            */
921         BIP_CSD_CONN_ELEM_NON_TRANSPARENT = 1, /**<     CSD connection element - NON TRANSPARENT                */
922         BIP_CSD_CONN_ELEM_BOTH_TRANSPARENT_PREF = 2, /**<       CSD connection element -BOTH TRANSPARENT PREFFERED              */
923         BIP_CSD_CONN_ELEM_BOTH_NON_TRANSPARENT_PREF = 3 /**<    CSD connection element -  NON TRANSPARENT PREFFERED             */
924 };
925
926 struct tel_sat_bearer_param_cs_bearer{
927         enum bearer_param_cs_data_rate data_rate;
928         enum bearer_param_cs_service_type service_type;
929         enum bearer_param_cs_connection_element_type connection_element_type;
930 };
931
932 enum bearer_param_ps_precedence_class{
933         BIP_GPRS_PRECED_CLASS_HIGH_PRIORITY = 0x01, /**<        GPRS precedence class -HIGH PRIORITY            */
934         BIP_GPRS_PRECED_CLASS_NORM_PRIORITY = 0x02, /**<        GPRS precedence class -NORM PRIORITY            */
935         BIP_GPRS_PRECED_CLASS_LOW_PRIORITY = 0x03 /**<  GPRS precedence class - LOW PRIORITY            */
936 };
937
938 enum bearer_param_ps_delay_class{
939         BIP_GPRS_DELAY_CLASS_1 = 0x01, /**<     GPRS delay class - 1            */
940         BIP_GPRS_DELAY_CLASS_2 = 0x02, /**<     GPRS delay class -      2       */
941         BIP_GPRS_DELAY_CLASS_3 = 0x03, /**<     GPRS delay class -      3       */
942         BIP_GPRS_DELAY_CLASS_4 = 0x04 /**<      GPRS delay class - 4            */
943 };
944
945 enum bearer_param_ps_reliability_class{
946         BIP_GPRS_RELIABILITY_CLASS_1 = 0x01, /**<       GPRS Reliability class -1               */
947         BIP_GPRS_RELIABILITY_CLASS_2 = 0x02, /**<       GPRS Reliability class -2               */
948         BIP_GPRS_RELIABILITY_CLASS_3 = 0x03, /**<       GPRS Reliability class -3               */
949         BIP_GPRS_RELIABILITY_CLASS_4 = 0x04, /**<       GPRS Reliability class -4               */
950         BIP_GPRS_RELIABILITY_CLASS_5 = 0x05 /**<        GPRS Reliability class -5               */
951 };
952
953 enum bearer_param_ps_peak_throughput_class{
954         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_8KBPS = 0x01, /**<  GPRS peak throughput class- UPTO 8KBPS          */
955         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_16KBPS = 0x02, /**< GPRS peak throughput class- UPTO 16KBPS         */
956         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_32KBPS = 0x03, /**< GPRS peak throughput class-UPTO 32KBPS          */
957         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_64KBPS = 0x04, /**< GPRS peak throughput class-UPTO 64KBPS          */
958         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_128KBPS = 0x05, /**<        GPRS peak throughput class- UPTO 128KBPS                        */
959         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_256KBPS = 0x06, /**<        GPRS peak throughput class- UPTO 256KBPS                        */
960         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_512KBPS = 0x07, /**<        GPRS peak throughput class- UPTO 512KBPS                */
961         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_1024KBPS = 0x08, /**<       GPRS peak throughput class-UPTO 1024KBPS                */
962         BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_2048KBPS = 0x09 /**<        GPRS peak throughput class- UPTO 2048KBPS               */
963 };
964
965 enum bearer_param_ps_mean_throughput_class{
966         BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_BPS = 0x01, /**<  GPRS mean throughput class - DOT 22 BPS         */
967         BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_BPS = 0x02, /**<  GPRS mean throughput class - DOT 44 BPS         */
968         BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_BPS = 0x03, /**<        GPRS mean throughput class -1 DOT 11 BPS                */
969         BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_BPS = 0x04, /**< GPRS mean throughput class -2 DOT 2 BPS         */
970         BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_4_BPS = 0x05, /**< GPRS mean throughput class -2 DOT 4 BPS                 */
971         BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_BPS = 0x06, /**<        GPRS mean throughput class - 11 DOT 1 BPS               */
972         BIP_GPRS_MEAN_THROUGHPUT_CLASS_22BPS = 0x07, /**<       GPRS mean throughput class -22BPS               */
973         BIP_GPRS_MEAN_THROUGHPUT_CLASS_44BPS = 0x08, /**<       GPRS mean throughput class - 44BPS              */
974         BIP_GPRS_MEAN_THROUGHPUT_CLASS_111BPS = 0x09, /**<      GPRS mean throughput class - 111BPS             */
975         BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_KBPS = 0x0A, /**< GPRS mean throughput class - DOT 22 KBPS                */
976         BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_KBPS = 0x0B, /**< GPRS mean throughput class -DOT 44 KBPS                 */
977         BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_KBPS = 0x0C, /**<       GPRS mean throughput class -1 DOT 11 KBPS               */
978         BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_KBPS = 0x0D, /**<        GPRS mean throughput class -2 DOT 2 KBPS                */
979         BIP_GPRS_MEAN_THROUGHPUT_CLASS_4_DOT_4_KBPS = 0x0E, /**<        GPRS mean throughput class - 4 DOT 4 KBPS               */
980         BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_KBPS = 0x0F, /**<       GPRS mean throughput class -11 DOT 1 KBPS               */
981         BIP_GPRS_MEAN_THROUGHPUT_CLASS_22KBPS = 0x10, /**<      GPRS mean throughput class - 22KBPS             */
982         BIP_GPRS_MEAN_THROUGHPUT_CLASS_44KBPS = 0x11, /**<      GPRS mean throughput class - 44KBPS             */
983         BIP_GPRS_MEAN_THROUGHPUT_CLASS_111KBPS = 0x12, /**<     GPRS mean throughput class -111KBPS             */
984         BIP_GPRS_MEAN_THROUGHPUT_CLASS_BEST_EFFORT = 0x13 /**<  GPRS mean throughput class - BEST EFFORT                */
985 };
986
987 enum bearer_param_ps_pdp_type{
988         BIP_GPRS_PDP_TYPE_IP = 0x02, /**<       bearer parameter GPRS pdp type - IP             */
989         BIP_GPRS_PDP_TYPE_RESERVED = 0xff /**<  reserved                */
990 };
991
992 struct tel_sat_bearer_param_ps_bearer{
993         enum bearer_param_ps_precedence_class precedence_class;
994         enum bearer_param_ps_delay_class delay_class;
995         enum bearer_param_ps_reliability_class reliability_class;
996         enum bearer_param_ps_peak_throughput_class peak_throughput_class;
997         enum bearer_param_ps_mean_throughput_class mean_throughput_class;
998         enum bearer_param_ps_pdp_type pdp_type;
999 };
1000
1001 enum bearer_param_local_link_service_type{
1002         BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_USIM = 0x00, /**<        local links service identity - value assigned by USIM           */
1003         BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_REMOTED_DEVICE = 0xFF /**<       local links service identity - value assigned by remote service */
1004 };
1005
1006 struct tel_sat_bearer_param_local_link_bearer{
1007         enum bearer_param_local_link_service_type service_type;
1008         char service_record[SAT_BEARER_PARAMS_LEN_MAX];
1009 };
1010
1011 struct tel_sat_bearer_description{
1012         enum bearer_type bearer_type;
1013         union{
1014                 struct tel_sat_bearer_param_cs_bearer cs_bearer_param;
1015                 struct tel_sat_bearer_param_ps_bearer ps_bearer_param;
1016                 struct tel_sat_bearer_param_local_link_bearer local_link_bearer_param;
1017         }bearer_parameter;
1018 };
1019
1020 /*
1021  * 8.53 Channel data
1022  */
1023 struct tel_sat_channel_data{
1024         unsigned char data_string_len; /**<     channel data string length      */
1025         char    data_string[SAT_CHANNEL_DATA_STRING_LEN_MAX];
1026 };
1027
1028 /*
1029  * 8.54 Channel data length
1030  */
1031 struct tel_sat_channel_data_len{
1032         unsigned char data_len; /**<    channel data length     */
1033 };
1034
1035
1036 /*
1037  * 8.55 Buffer size
1038  */
1039 struct tel_sat_buffer_size{
1040         unsigned char size[2]; /**<     channel data buffer size        */
1041 };
1042
1043 /*
1044  * 8.56 Channel status
1045  */
1046 enum channel_status{
1047         link_or_packet_service_not_activated,
1048         link_or_packet_service_activated
1049 };
1050
1051 enum channel_status_info{
1052         no_futher_info = 0x00,
1053         link_dropped = 0x05
1054 };
1055
1056 struct tel_sat_channel_status{
1057         unsigned char channel_id;
1058         enum channel_status status;
1059         enum channel_status_info status_info;
1060 };
1061
1062 /*
1063  * 8.58 Other Address
1064  */
1065 enum address_type{
1066         ADDR_TYPE_IPv4 = 0x21, /**<     address type - IPv4     */
1067         ADDR_TYPE_IPv6 = 0x57, /**<     address type - IPv6     */
1068         ADDR_RESERVED = 0xFF /**<       reserved                */
1069 };
1070
1071 struct tel_sat_other_address{
1072         enum address_type address_type; /**<    channel address type    */
1073         unsigned char address_len; /**< channel address length  */
1074         char address[SAT_OTHER_ADDR_LEN_MAX]; /**<      channel address */
1075 };
1076
1077 /*
1078  * 8.59 UICC/terminal interface transport level
1079  */
1080 enum transport_protocol_type{
1081         TP_TYPE_UDP_UICC_CLIENT = 0x01, /**<    transport protocol type- UDP UICC CLIENT        */
1082         TP_TYPE_TCP_UICC_CLIENT = 0x02, /**<    transport protocol type-TCP UICC CLIENT         */
1083         TP_TYPE_TCP_UICC_SERVER = 0x03 /**<     transport protocol type- TCP UICC SERVER        */
1084 };
1085
1086 struct tel_sat_uicc_terminal_interface_transport_level{
1087         enum transport_protocol_type protocol_type;
1088         unsigned short port_number;
1089 };
1090
1091 /*
1092  * 8.68 Remote entity address
1093  */
1094 enum remote_entity_coding_type{
1095         REMOTE_ENTITY_ADDR_CODING_TYPE_IEEE802_48BIT = 0, /**<  remote entity address coding type- IEEE802 48BIT                */
1096         REMOTE_ENTITY_ADDR_CODING_TYPE_IRDA_32BIT = 1, /**<     remote entity address coding type- IRDA 32BIT           */
1097         REMOTE_ENTITY_ADDR_CODING_TYPE_RESERVED = 0xFF /**<     reserved                */
1098 };
1099
1100 struct tel_sat_remote_entity_address{
1101         enum remote_entity_coding_type coding_type;
1102         unsigned short length;
1103         unsigned char remote_entity_address[SAT_REMOTE_ENTITY_ADDR_LEN_MAX];
1104 };
1105
1106 /*
1107  * 8.70 Network access name
1108  */
1109 struct tel_sat_network_access_name{
1110         unsigned short length;
1111         unsigned char network_access_name[SAT_NET_ACC_NAM_LEN_MAX];
1112 };
1113
1114 /*
1115  * 8.72 Text attribute
1116  */
1117 struct tel_sat_text_attribute{
1118         unsigned char text_formatting[4];
1119 };
1120
1121 /*
1122  * 8.73 Item text attribute list
1123  */
1124 struct tel_sat_text_attribute_list{
1125         unsigned int list_cnt;
1126         struct tel_sat_text_attribute text_attribute_list[SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT];
1127 };
1128
1129 /*
1130  * 6.6 Structure of proactive UICC commands
1131  */
1132
1133 /*
1134  * 6.6.1 DISPLAY TEXT
1135  */
1136 struct tel_sat_display_text_tlv{
1137         struct tel_sat_cmd_detail_info command_detail;
1138         struct tel_sat_device_identities device_id;
1139         struct tel_sat_text_string_object text;
1140         struct tel_sat_icon_identifier icon_id;
1141         gboolean immediate_response_requested;
1142         struct tel_sat_duration duration;
1143         struct tel_sat_text_attribute text_attribute;
1144 };
1145
1146 /*
1147  * 6.6.2 GET INKEY
1148  */
1149 struct tel_sat_get_inkey_tlv{
1150         struct tel_sat_cmd_detail_info command_detail;
1151         struct tel_sat_device_identities device_id;
1152         struct tel_sat_text_string_object text;
1153         struct tel_sat_icon_identifier icon_id;
1154         struct tel_sat_duration duration;
1155         struct tel_sat_text_attribute text_attribute;
1156 };
1157
1158 /*
1159  * 6.6.3 GET INPUT
1160  */
1161 struct tel_sat_get_input_tlv{
1162         struct tel_sat_cmd_detail_info command_detail;
1163         struct tel_sat_device_identities device_id;
1164         struct tel_sat_text_string_object text;
1165         struct tel_sat_response_length rsp_len;
1166         struct tel_sat_text_string_object default_text;
1167         struct tel_sat_icon_identifier icon_id;
1168         struct tel_sat_text_attribute text_attribute;
1169 };
1170
1171 /*
1172  * 6.6.4 MORE TIME
1173  */
1174 struct tel_sat_more_time_tlv{
1175         struct tel_sat_cmd_detail_info command_detail;
1176         struct tel_sat_device_identities device_id;
1177 };
1178
1179 /*
1180  * 6.6.5 PLAY TONE
1181  */
1182 struct tel_sat_play_tone_tlv{
1183         struct tel_sat_cmd_detail_info command_detail;
1184         struct tel_sat_device_identities device_id;
1185         struct tel_sat_alpha_identifier alpha_id;
1186         struct tel_sat_tone tone;
1187         struct tel_sat_duration duration;
1188         struct tel_sat_icon_identifier icon_id;
1189         struct tel_sat_text_attribute text_attribute;
1190 };
1191
1192 /*
1193  * 6.6.7 SET-UP MENU
1194  */
1195 struct tel_sat_setup_menu_tlv{
1196         struct tel_sat_cmd_detail_info command_detail;
1197         struct tel_sat_device_identities device_id;
1198         struct tel_sat_alpha_identifier alpha_id;
1199         unsigned char menu_item_cnt;
1200         struct tel_sat_item_info menu_item[SAT_MENU_ITEM_COUNT_MAX];
1201         struct tel_sat_item_next_action_indicatior_list next_act_ind_list;
1202         struct tel_sat_icon_identifier icon_id;
1203         struct tel_sat_icon_identifier_list icon_list;
1204         struct tel_sat_text_attribute text_attribute;
1205         struct tel_sat_text_attribute_list text_attribute_list;
1206 };
1207
1208 /*
1209  * 6.6.8 SELECT ITEM
1210  */
1211 struct tel_sat_select_item_tlv{
1212         struct tel_sat_cmd_detail_info command_detail;
1213         struct tel_sat_device_identities device_id;
1214         struct tel_sat_alpha_identifier alpha_id;
1215         unsigned char menu_item_cnt;
1216         struct tel_sat_item_info menu_item[SAT_MENU_ITEM_COUNT_MAX];
1217         struct tel_sat_item_next_action_indicatior_list item_next_act_ind_list;
1218         struct tel_sat_item_identifier item_identifier;
1219         struct tel_sat_icon_identifier icon_id;
1220         struct tel_sat_icon_identifier_list icon_list;
1221         struct tel_sat_text_attribute text_attribute;
1222         struct tel_sat_text_attribute_list text_attribute_list;
1223         //frame identifier 8.80
1224 };
1225
1226 /*
1227  * 6.6.9 SEND SMS
1228  */
1229 struct tel_sat_send_sms_tlv{
1230         struct tel_sat_cmd_detail_info command_detail;
1231         struct tel_sat_device_identities device_id;
1232         struct tel_sat_alpha_identifier alpha_id;
1233         struct tel_sat_address address;
1234         struct tel_sat_sms_tpdu sms_tpdu;
1235         //CDMA-SMS TPDU 8.71
1236         struct tel_sat_icon_identifier icon_id;
1237         struct tel_sat_text_attribute text_attribute;
1238         //frame identifier 8.80
1239 };
1240
1241 /*
1242  * 6.6.10 SEND SS
1243  */
1244 struct tel_sat_send_ss_tlv{
1245         struct tel_sat_cmd_detail_info command_detail;
1246         struct tel_sat_device_identities device_id;
1247         struct tel_sat_alpha_identifier alpha_id;
1248         struct tel_sat_ss_string ss_string;
1249         struct tel_sat_icon_identifier icon_id;
1250         struct tel_sat_text_attribute text_attribute;
1251         //frame identifier 8.80
1252 };
1253
1254 /*
1255  * 6.6.11 SEND USSD
1256  */
1257 struct tel_sat_send_ussd_tlv{
1258         struct tel_sat_cmd_detail_info command_detail;
1259         struct tel_sat_device_identities device_id;
1260         struct tel_sat_alpha_identifier alpha_id;
1261         struct tel_sat_ussd_string ussd_string;
1262         struct tel_sat_icon_identifier icon_id;
1263         struct tel_sat_text_attribute text_attribute;
1264         //frame identifier 8.80
1265 };
1266
1267 /*
1268  * 6.6.12 SETUP CALL
1269  */
1270 struct tel_sat_setup_call_tlv{
1271         struct tel_sat_cmd_detail_info command_detail;
1272         struct tel_sat_device_identities device_id;
1273         struct tel_sat_address address;
1274         struct tel_sat_ccp ccp;
1275         struct tel_sat_subaddress subaddress;
1276         struct tel_sat_duration duration;
1277         struct tel_sat_alpha_identifier user_confirm_alpha_id;
1278         struct tel_sat_icon_identifier user_confirm_icon_id;
1279         struct tel_sat_alpha_identifier call_setup_alpha_id;
1280         struct tel_sat_icon_identifier call_setup_icon_id;
1281         struct tel_sat_text_attribute user_confirm_text_attribute;
1282         struct tel_sat_text_attribute call_setup_text_attribute;
1283         //frame identifier 8.80
1284 };
1285
1286 /*
1287  * 6.6.13 REFRESH
1288  */
1289 struct tel_sat_refresh_tlv{
1290         struct tel_sat_cmd_detail_info command_detail;
1291         struct tel_sat_device_identities device_id;
1292         struct tel_sat_file_list file_list;
1293         char aid[16]; // 8.60 AID - length is 16 byte, Refer TS 101.220
1294 };
1295
1296 /*
1297  * 6.6.15 PROVIDE LOCAL INFORMATION
1298  */
1299 struct tel_sat_provide_local_info_tlv{
1300         struct tel_sat_cmd_detail_info command_detail;
1301         struct tel_sat_device_identities device_id;
1302 };
1303
1304 /*
1305  * 6.6.16 SETUP EVENT LIST
1306  */
1307 struct tel_sat_setup_event_list_tlv{
1308         struct tel_sat_cmd_detail_info command_detail;
1309         struct tel_sat_device_identities device_id;
1310         struct tel_sat_event_list event_list;
1311         struct tel_sat_event_list modem_event_list;
1312 };
1313
1314 /*
1315  * 6.6.22 SETUP IDLE MODE TEXT
1316  */
1317 struct tel_sat_setup_idle_mode_text_tlv{
1318         struct tel_sat_cmd_detail_info command_detail;
1319         struct tel_sat_device_identities device_id;
1320         struct tel_sat_text_string_object text;
1321         struct tel_sat_icon_identifier icon_id;
1322         struct tel_sat_text_attribute text_attribute;
1323 };
1324
1325 /*
1326  * 6.6.24 SEND DTMF
1327  */
1328 struct tel_sat_send_dtmf_tlv{
1329         struct tel_sat_cmd_detail_info command_detail;
1330         struct tel_sat_device_identities device_id;
1331         struct tel_sat_alpha_identifier alpha_id;
1332         struct tel_sat_dtmf_string dtmf_string;
1333         struct tel_sat_icon_identifier icon_id;
1334         struct tel_sat_text_attribute text_attribute;
1335 };
1336
1337 /*
1338  * 6.6.25 LANGUAGE NOTIFICATION
1339  */
1340 struct tel_sat_language_notification_tlv{
1341         struct tel_sat_cmd_detail_info command_detail;
1342         struct tel_sat_device_identities device_id;
1343         enum tel_sim_language_type language;
1344 };
1345
1346 /*
1347  * 6.6.26 LAUNCH BROWSER
1348  */
1349 struct tel_sat_launch_browser_tlv{
1350         struct tel_sat_cmd_detail_info command_detail;
1351         struct tel_sat_device_identities device_id;
1352         enum browser_identity browser_id;
1353         struct tel_sat_url url;
1354         struct tel_sat_bearer_list bearer;
1355         int file_ref_count;
1356         struct tel_sat_provisioning_file_ref file_list[SAT_PROVISIONING_REF_MAX_COUNT];
1357         struct tel_sat_text_string_object gateway_proxy_text;
1358         struct tel_sat_alpha_identifier user_confirm_alpha_id;
1359         struct tel_sat_icon_identifier user_confirm_icon_id;
1360         struct tel_sat_text_attribute user_confirm_text_attribute;
1361         //frame identifier 8.80
1362 };
1363
1364 /*
1365  * 6.6.27 OPEN CHANNEL
1366  */
1367 struct tel_sat_open_channel_cs_bearer{
1368         struct tel_sat_address address;
1369         struct tel_sat_subaddress subaddress;
1370         struct tel_sat_duration duration1;
1371         struct tel_sat_duration duration2;
1372         struct tel_sat_other_address other_address;
1373         struct tel_sat_text_string_object text_user_login;
1374         struct tel_sat_text_string_object text_user_pwd;
1375 };
1376
1377 struct tel_sat_open_channel_packet_data_service_bearer{
1378         struct tel_sat_network_access_name network_access_name;
1379         struct tel_sat_other_address other_address;
1380         struct tel_sat_text_string_object text_user_login;
1381         struct tel_sat_text_string_object text_user_pwd;
1382 };
1383
1384 struct tel_sat_open_channel_local_bearer{
1385         struct tel_sat_duration duration1;
1386         struct tel_sat_duration duration2;
1387         struct tel_sat_text_string_object text_user_pwd;
1388         struct tel_sat_remote_entity_address remote_entity_address;
1389 };
1390
1391 struct tel_sat_open_channel_default_bearer{
1392         struct tel_sat_other_address other_address;
1393         struct tel_sat_text_string_object text_user_login;
1394         struct tel_sat_text_string_object text_user_pwd;
1395 };
1396
1397 struct tel_sat_open_channel_tlv{
1398         struct tel_sat_cmd_detail_info command_detail;
1399         struct tel_sat_device_identities device_id;
1400         struct tel_sat_alpha_identifier alpha_id;
1401         struct tel_sat_icon_identifier icon_id;
1402         struct tel_sat_bearer_description bearer_desc;
1403         struct tel_sat_buffer_size buffer_size;
1404         struct tel_sat_uicc_terminal_interface_transport_level interface_transport_level;
1405         struct tel_sat_other_address data_destination_address;
1406         struct tel_sat_text_attribute text_attribute;
1407         //frame identifier 8.80
1408         union{
1409                 struct tel_sat_open_channel_cs_bearer cs_bearer;
1410                 struct tel_sat_open_channel_packet_data_service_bearer ps_bearer;
1411                 struct tel_sat_open_channel_local_bearer local_bearer;
1412                 struct tel_sat_open_channel_default_bearer default_bearer;
1413         }bearer_detail;
1414 };
1415
1416 /*
1417  * 6.6.28 CLOSE CHANNEL
1418  */
1419 struct tel_sat_close_channel_tlv{
1420         struct tel_sat_cmd_detail_info command_detail;
1421         struct tel_sat_device_identities device_id;
1422         struct tel_sat_alpha_identifier alpha_id;
1423         struct tel_sat_icon_identifier icon_id;
1424         struct tel_sat_text_attribute text_attribute;
1425 };
1426
1427 /*
1428  * 6.6.29 RECEIVE DATA
1429  */
1430 struct tel_sat_receive_channel_tlv{
1431         struct tel_sat_cmd_detail_info command_detail;
1432         struct tel_sat_device_identities device_id;
1433         struct tel_sat_alpha_identifier alpha_id;
1434         struct tel_sat_icon_identifier icon_id;
1435         struct tel_sat_channel_data_len channel_data_len;
1436         struct tel_sat_text_attribute text_attribute;
1437 };
1438
1439 /*
1440  * 6.6.30 SEND DATA
1441  */
1442 struct tel_sat_send_channel_tlv{
1443         struct tel_sat_cmd_detail_info command_detail;
1444         struct tel_sat_device_identities device_id;
1445         struct tel_sat_alpha_identifier alpha_id;
1446         struct tel_sat_icon_identifier icon_id;
1447         struct tel_sat_channel_data channel_data;
1448         struct tel_sat_text_attribute text_attribute;
1449 };
1450
1451 /*
1452  * 6.6.31 GET CHANNEL STATUS
1453  */
1454 struct tel_sat_get_channel_status_tlv{
1455         struct tel_sat_cmd_detail_info command_detail;
1456         struct tel_sat_device_identities device_id;
1457 };
1458
1459 /*
1460  * CoreObject
1461  * Structure of Req. Rsp. Noti.
1462  */
1463
1464 /*
1465  * Define SAT Request structure
1466  */
1467 enum sat_envelop_sub_cmd{
1468         ENVELOP_MENU_SELECTION,
1469         ENVELOP_CALL_CONTROL,
1470         ENVELOP_TIMER_EXPIRATION,
1471         ENVELOP_EVENT_DOWNLOAD,
1472 };
1473
1474 struct tel_sat_envelop_menu_selection_tlv{
1475         struct tel_sat_device_identities device_identitie;
1476         struct tel_sat_item_identifier item_identifier;
1477         gboolean help_request;
1478 };
1479
1480 struct tel_sat_envelop_event_download_tlv{
1481         struct tel_sat_device_identities device_identitie;
1482         enum event_list event;
1483         gboolean idle_screen;
1484         enum tel_sim_language_type language;
1485         enum browser_termination_cause browser_termination;
1486         struct tel_sat_channel_status channel_status;
1487         struct tel_sat_channel_data_len channel_data_len;
1488 };
1489
1490 struct treq_sat_envelop_cmd_data{
1491         enum sat_envelop_sub_cmd sub_cmd;
1492         union{
1493                 struct tel_sat_envelop_menu_selection_tlv menu_select;
1494                 struct tel_sat_envelop_event_download_tlv event_download;
1495         }envelop_data;
1496 };
1497
1498 struct tel_sat_tr_display_text_tlv{
1499         struct tel_sat_cmd_detail_info command_detail;
1500         struct tel_sat_device_identities device_id;
1501         enum tel_sat_result_type result_type;
1502         enum tel_sat_me_problem_type me_problem_type;
1503 };
1504
1505 struct tel_sat_tr_get_inkey_tlv{
1506         struct tel_sat_cmd_detail_info command_detail;
1507         struct tel_sat_device_identities device_id;
1508         enum tel_sat_result_type result_type;
1509         enum tel_sat_me_problem_type me_problem_type;
1510         struct tel_sat_text_string_object text;
1511         struct tel_sat_duration duration;
1512 };
1513
1514 struct tel_sat_tr_get_input_tlv{
1515         struct tel_sat_cmd_detail_info command_detail;
1516         struct tel_sat_device_identities device_id;
1517         enum tel_sat_result_type result_type;
1518         enum tel_sat_me_problem_type me_problem_type;
1519         struct tel_sat_text_string_object text;
1520 };
1521
1522 struct tel_sat_tr_more_time_tlv{
1523         struct tel_sat_cmd_detail_info command_detail;
1524         struct tel_sat_device_identities device_id;
1525         enum tel_sat_result_type result_type;
1526         enum tel_sat_me_problem_type me_problem_type;
1527 };
1528
1529 struct tel_sat_tr_play_tone_tlv{
1530         struct tel_sat_cmd_detail_info command_detail;
1531         struct tel_sat_device_identities device_id;
1532         enum tel_sat_result_type result_type;
1533         enum tel_sat_me_problem_type me_problem_type;
1534 };
1535
1536 struct tel_sat_tr_refresh_tlv{
1537         struct tel_sat_cmd_detail_info command_detail;
1538         struct tel_sat_device_identities device_id;
1539         enum tel_sat_result_type result_type;
1540         enum tel_sat_me_problem_type me_problem_type;
1541 };
1542
1543 struct tel_sat_tr_setup_menu_tlv{
1544         struct tel_sat_cmd_detail_info command_detail;
1545         struct tel_sat_device_identities device_id;
1546         enum tel_sat_result_type result_type;
1547         enum tel_sat_me_problem_type me_problem_type;
1548 };
1549
1550 struct tel_sat_tr_select_item_tlv{
1551         struct tel_sat_cmd_detail_info command_detail;
1552         struct tel_sat_device_identities device_id;
1553         enum tel_sat_result_type result_type;
1554         enum tel_sat_me_problem_type me_problem_type;
1555         gboolean other_info;
1556         struct tel_sat_item_identifier item_identifier;
1557 };
1558
1559 struct tel_sat_tr_send_sms_tlv{
1560         struct tel_sat_cmd_detail_info command_detail;
1561         struct tel_sat_device_identities device_id;
1562         enum tel_sat_result_type result_type;
1563         enum tel_sat_me_problem_type me_problem_type;
1564         enum tel_sat_call_ctrl_problem_type cc_problem_type;
1565 };
1566
1567 struct tel_sat_tr_send_ss_tlv{
1568         struct tel_sat_cmd_detail_info command_detail;
1569         struct tel_sat_device_identities device_id;
1570         enum tel_sat_result_type result_type;
1571         enum tel_sat_me_problem_type me_problem_type;
1572         enum ss_problem_type ss_problem;
1573         gboolean other_info;
1574         enum tel_sat_call_ctrl_problem_type cc_problem_type;
1575         struct tel_sat_call_ctrl_req_action call_ctrl_req_act;
1576         enum tel_sat_result_type result_type2;
1577         struct tel_sat_text_string_object text;
1578 };
1579
1580 struct tel_sat_tr_send_ussd_tlv{
1581         struct tel_sat_cmd_detail_info command_detail;
1582         struct tel_sat_device_identities device_id;
1583         enum tel_sat_result_type result_type;
1584         enum tel_sat_me_problem_type me_problem_type;
1585         enum ussd_problem_type ussd_problem;
1586         gboolean other_info;
1587         gboolean call_ctrl_has_modification;
1588         enum tel_sat_call_ctrl_problem_type cc_problem_type;
1589         struct tel_sat_call_ctrl_req_action call_ctrl_req_act;
1590         enum tel_sat_result_type result_type2;
1591         struct tel_sat_text_string_object text;
1592         struct tel_sat_text_string_object text2;
1593 };
1594
1595 struct tel_sat_tr_setup_call_tlv{
1596         struct tel_sat_cmd_detail_info command_detail;
1597         struct tel_sat_device_identities device_id;
1598         enum tel_sat_result_type result_type;
1599         enum tel_sat_me_problem_type me_problem_type;
1600         gboolean other_info;
1601         enum network_problem_type network_problem_type;
1602         enum tel_sat_call_ctrl_problem_type cc_problem_type;
1603         struct tel_sat_call_ctrl_req_action call_ctrl_req_act;
1604         enum tel_sat_result_type result_type2;
1605         struct tel_sat_text_string_object text;
1606         gboolean tapi_cause;
1607         int tapi_call_level_cause;
1608         int tapi_ss_level_cause;
1609 };
1610
1611 struct tel_sat_tr_provide_local_info_tlv{
1612         struct tel_sat_cmd_detail_info command_detail;
1613         struct tel_sat_device_identities device_id;
1614         enum tel_sat_result_type result_type;
1615         enum tel_sat_me_problem_type me_problem_type;
1616         gboolean other_info;
1617         union {
1618                 struct tel_sat_location_information location_info;
1619                 struct tel_sat_imei imei;
1620                 struct tel_sat_network_measurement_results nmr;
1621                 struct tel_sat_date_time_and_timezone date_time_and_timezone;
1622                 enum tel_sim_language_type language;
1623         }other;
1624 };
1625
1626 struct tel_sat_tr_setup_event_list_tlv{
1627         struct tel_sat_cmd_detail_info command_detail;
1628         struct tel_sat_device_identities device_id;
1629         enum tel_sat_result_type result_type;
1630         enum tel_sat_me_problem_type me_problem_type;
1631 };
1632
1633 struct tel_sat_tr_setup_idle_mode_text_tlv{
1634         struct tel_sat_cmd_detail_info command_detail;
1635         struct tel_sat_device_identities device_id;
1636         enum tel_sat_result_type result_type;
1637         enum tel_sat_me_problem_type me_problem_type;
1638 };
1639
1640 struct tel_sat_tr_send_dtmf_tlv{
1641         struct tel_sat_cmd_detail_info command_detail;
1642         struct tel_sat_device_identities device_id;
1643         enum tel_sat_result_type result_type;
1644         enum tel_sat_me_problem_type me_problem_type;
1645 };
1646
1647 struct tel_sat_tr_language_notification_tlv{
1648         struct tel_sat_cmd_detail_info command_detail;
1649         struct tel_sat_device_identities device_id;
1650         enum tel_sat_result_type result_type;
1651         enum tel_sat_me_problem_type me_problem_type;
1652 };
1653
1654 struct tel_sat_tr_launch_browser_tlv{
1655         struct tel_sat_cmd_detail_info command_detail;
1656         struct tel_sat_device_identities device_id;
1657         enum tel_sat_result_type result_type;
1658         enum tel_sat_me_problem_type me_problem_type;
1659         enum browser_problem_type browser_problem_type;
1660 };
1661
1662 struct tel_sat_tr_open_channel_tlv{
1663         struct tel_sat_cmd_detail_info command_detail;
1664         struct tel_sat_device_identities device_id;
1665         enum tel_sat_result_type result_type;
1666         enum tel_sat_me_problem_type me_problem_type;
1667         enum bip_problem_type bip_problem_type;
1668         struct tel_sat_channel_status channel_status;
1669         struct tel_sat_bearer_description bearer_desc;
1670         struct tel_sat_buffer_size buffer_size;
1671         //struct tel_sat_other_address other_address; (uicc server mode)
1672 };
1673
1674 struct tel_sat_tr_close_channel_tlv{
1675         struct tel_sat_cmd_detail_info command_detail;
1676         struct tel_sat_device_identities device_id;
1677         enum tel_sat_result_type result_type;
1678         enum tel_sat_me_problem_type me_problem_type;
1679         enum bip_problem_type bip_problem_type;
1680 };
1681
1682 struct tel_sat_tr_send_data_tlv{
1683         struct tel_sat_cmd_detail_info command_detail;
1684         struct tel_sat_device_identities device_id;
1685         enum tel_sat_result_type result_type;
1686         enum tel_sat_me_problem_type me_problem_type;
1687         enum bip_problem_type bip_problem_type;
1688         struct tel_sat_channel_data_len channel_data_len;
1689 };
1690
1691 struct tel_sat_tr_receive_data_tlv{
1692         struct tel_sat_cmd_detail_info command_detail;
1693         struct tel_sat_device_identities device_id;
1694         enum tel_sat_result_type result_type;
1695         enum tel_sat_me_problem_type me_problem_type;
1696         enum bip_problem_type bip_problem_type;
1697         struct tel_sat_channel_data channel_data;
1698         struct tel_sat_channel_data_len channel_data_len;
1699 };
1700
1701 struct tel_sat_tr_get_channel_status_tlv{
1702         struct tel_sat_cmd_detail_info command_detail;
1703         struct tel_sat_device_identities device_id;
1704         enum tel_sat_result_type result_type;
1705         enum tel_sat_me_problem_type me_problem_type;
1706         enum bip_problem_type bip_problem_type;
1707         struct tel_sat_channel_status channel_status;
1708 };
1709
1710 struct treq_sat_terminal_rsp_data{
1711         int cmd_number;
1712         enum tel_sat_proactive_cmd_type cmd_type;
1713         union{
1714                 struct tel_sat_tr_display_text_tlv display_text;
1715                 struct tel_sat_tr_get_inkey_tlv get_inkey;
1716                 struct tel_sat_tr_get_input_tlv get_input;
1717                 struct tel_sat_tr_more_time_tlv more_time;
1718                 struct tel_sat_tr_play_tone_tlv play_tone;
1719                 struct tel_sat_tr_refresh_tlv refresh;
1720                 struct tel_sat_tr_setup_menu_tlv setup_menu;
1721                 struct tel_sat_tr_select_item_tlv select_item;
1722                 struct tel_sat_tr_send_sms_tlv send_sms;
1723                 struct tel_sat_tr_send_ss_tlv send_ss;
1724                 struct tel_sat_tr_send_ussd_tlv send_ussd;
1725                 struct tel_sat_tr_setup_call_tlv setup_call;
1726                 struct tel_sat_tr_provide_local_info_tlv provide_local_info;
1727                 struct tel_sat_tr_setup_event_list_tlv setup_event_list;
1728                 struct tel_sat_tr_setup_idle_mode_text_tlv setup_idle_mode_text;
1729                 struct tel_sat_tr_send_dtmf_tlv send_dtmf;
1730                 struct tel_sat_tr_language_notification_tlv language_notification;
1731                 struct tel_sat_tr_launch_browser_tlv launch_browser;
1732                 struct tel_sat_tr_open_channel_tlv open_channel;
1733                 struct tel_sat_tr_close_channel_tlv close_channel;
1734                 struct tel_sat_tr_send_data_tlv send_data;
1735                 struct tel_sat_tr_receive_data_tlv receive_data;
1736                 struct tel_sat_tr_get_channel_status_tlv get_channel_status;
1737         }terminal_rsp_data;
1738 };
1739
1740 /*
1741  * Define SAT Response structure
1742  */
1743 enum envelop_rsp{
1744         ENVELOPE_SUCCESS,       /**<    envelope result - success       */
1745         ENVELOPE_SIM_BUSY,      /**<    envelope result - USIM busy     */
1746         ENVELOPE_FAILED /**<    envelope result - failed        */
1747 };
1748
1749 struct tresp_sat_envelop_data{
1750         int result;
1751         enum sat_envelop_sub_cmd sub_cmd;
1752         enum envelop_rsp envelop_resp;
1753 };
1754
1755 /*
1756  * Define SAT Notification structure
1757  */
1758 struct tnoti_sat_proactive_ind{
1759         int cmd_number;
1760         enum tel_sat_proactive_cmd_type cmd_type;
1761         union{
1762                 struct tel_sat_display_text_tlv display_text;
1763                 struct tel_sat_get_inkey_tlv get_inkey;
1764                 struct tel_sat_get_input_tlv get_input;
1765                 struct tel_sat_more_time_tlv more_time;
1766                 struct tel_sat_play_tone_tlv play_tone;
1767                 struct tel_sat_setup_menu_tlv setup_menu;
1768                 struct tel_sat_select_item_tlv select_item;
1769                 struct tel_sat_send_sms_tlv send_sms;
1770                 struct tel_sat_send_ss_tlv send_ss;
1771                 struct tel_sat_send_ussd_tlv send_ussd;
1772                 struct tel_sat_setup_call_tlv setup_call;
1773                 struct tel_sat_refresh_tlv refresh;
1774                 struct tel_sat_provide_local_info_tlv provide_local_info;
1775                 struct tel_sat_setup_event_list_tlv setup_event_list;
1776                 struct tel_sat_setup_idle_mode_text_tlv setup_idle_mode_text;
1777                 struct tel_sat_send_dtmf_tlv send_dtmf;
1778                 struct tel_sat_language_notification_tlv language_notification;
1779                 struct tel_sat_launch_browser_tlv launch_browser;
1780                 struct tel_sat_open_channel_tlv open_channel;
1781                 struct tel_sat_close_channel_tlv close_channel;
1782                 struct tel_sat_receive_channel_tlv receive_data;
1783                 struct tel_sat_send_channel_tlv send_data;
1784                 struct tel_sat_get_channel_status_tlv get_channel_status;
1785         }proactive_ind_data;
1786 };
1787 __END_DECLS
1788
1789 #endif