sync with private git ver.0.6.14
[framework/telephony/libslp-tapi.git] / include / TelSms.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 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 /**
22 * @open
23 * @ingroup              TelephonyAPI
24 * @addtogroup   NetText_TAPI    NetText(SMS)
25 * @{
26 *
27 * @file TelNetText.h
28
29      @brief This file serves as a "C" header file defines structures for Tapi Network Text Services. \n
30       It contains a sample set of constants, enums, structs that would be required by applications.
31
32  */
33 #ifndef _TEL_NETTEXT_H_
34 #define _TEL_NETTEXT_H_
35
36 #include <TelSim.h>
37
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42
43 /* NetText */
44 /** EF-SMSP digit length */
45 #define TAPI_SIM_SMSP_ADDRESS_LEN               20
46 /** EF-SMSP alpha id length */
47 #define TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX          128
48
49 #define TAPI_NETTEXT_MSG_SIZE_MAX               918 /**< Maximum Message Size */
50 #define TAPI_NETTEXT_CB_SIZE_MAX                        93 /** Maximum CB Message Size */
51 #define TAPI_NETTEXT_ETWS_SIZE_MAX                      56 /** Maximum ETWS Message Size */
52 #define TAPI_NETTEXT_ADDRESS_LEN_MAX    20 /* Nettext Address Length */
53 #define TAPI_NETTEXT_SCADDRESS_LEN_MAX  18 /* SC Address Length */
54
55 #define TAPI_NETTEXT_CB_PAGE_SIZE_MAX                            93    /**< CB maximum page size*/
56 #define TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX                 90    /**< Maximum GSM SMS message number*/
57 #define TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX      50    /**< Maximum GSM SMS CBMI list size*/
58 #define TAPI_NETTEXT_SMDATA_SIZE_MAX                           165  /**< Maximum SMS data size that can be stored*/
59 #define TAPI_NETTEXT_MAX_SMS_SERVICE_CENTER_ADDR   12    /**<Maximum SMS service center address*/
60 #define TAPI_NETTEXT_MAX_INDEX                                        255 /**< Maximum index value for SMS */
61
62 #define TAPI_NETTEXT_SMSP_PARAMS_MAX_LEN                28
63
64 // ************************  CDMA Features  **************************//
65 #define TAPI_NETTEXT_PARAM_TELESERVICE_MASK                     1 << 0                          /**< Teleservice parameter bit position */
66 #define TAPI_NETTEXT_PARAM_SERVICE_CATEGORY_MASK                1 << 1                          /**< Service Category parameter bit position */
67 #define TAPI_NETTEXT_PARAM_ADDRESS_MASK                         1 << 2                          /**< Address parameter bit position */
68 #define TAPI_NETTEXT_PARAM_SUBADDRESS_MASK                      1 << 3                          /**< Subaddress parameter bit position */
69 #define TAPI_NETTEXT_PARAM_BEARER_REPLY_MASK                    1 << 4                          /**< Bearer reply parameter bit position */
70 #define TAPI_NETTEXT_PARAM_CAUSE_CODES_MASK                     1 << 5                          /**< Cause Code parameter bit position */
71 #define TAPI_NETTEXT_PARAM_MESSAGE_ID_MASK                      1 << 6                          /**< Message ID parameter bit position */
72 #define TAPI_NETTEXT_PARAM_USER_DATA_MASK                       1 << 7                          /**< User Data parameter bit position */
73 #define TAPI_NETTEXT_PARAM_USER_RESPONSE_CODE_MASK              1 << 8                          /**< User Response Code parameter bit position */
74 #define TAPI_NETTEXT_PARAM_MC_TIME_STAMP_MASK                   1 << 9                          /**< Message Center Timestamp parameter bit position */
75 #define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_ABS_MASK             1 << 10                         /**< Valid period Absolute parameter bit position */
76 #define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_REL_MASK                     1 << 11                         /**< Valid period Relative parameter bit position */
77 #define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_ABS_MASK           1 << 12                         /**< Deferred delivery absolute parameter bit position */
78 #define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_REL_MASK           1 << 13                         /**< Deferred delivery relative parameter bit position */
79 #define TAPI_NETTEXT_PARAM_PRIORITY_MASK                                1 << 14                         /**< Priority parameter bit position */
80 #define TAPI_NETTEXT_PARAM_PRIVACY_MASK                         1 << 15                         /**< Privacy parameter bit position */
81 #define TAPI_NETTEXT_PARAM_REPLY_OPTION_MASK                    1 << 16                         /**< Reply Option parameter bit position */
82 #define TAPI_NETTEXT_PARAM_NUMBER_OF_MESSAGE_MASK               1 << 17                         /**< Number of message parameter bit position */
83 #define TAPI_NETTEXT_PARAM_ALERT_ON_DELIVERY_MASK                       1 << 18                         /**< Alert on delivery parameter bit position */
84 #define TAPI_NETTEXT_PARAM_LANGUAGE_MASK                        1 << 19                         /**< Language parameter bit position */
85 #define TAPI_NETTEXT_PARAM_CALLBACK_MASK                                1 << 20                         /**< Callback Number parameter bit position */
86 #define TAPI_NETTEXT_PARAM_DISPLAY_MODE_MASK                    1 << 21                         /**< Display mode parameter bit position */
87 #define TAPI_NETTEXT_PARAM_MULTI_ENCODING_USER_DATA_MASK        1 << 22                         /**< Multi Encoding user data parameter bit position */
88
89 #define TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA                         160                                     /**< Maximum MT user data  size*/
90 #define TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA                         160                                     /**< Maximum MO user data  size*/
91
92 #define TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS                                              32                                      /**< MAX sms destination(or origination ) address /call back number */
93
94 #define TAPI_NETTEXT_ERR_CLASS0_STATUS_SEND_OK                                                          0       /**< send success */
95 #define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_VACANT                                                         0       /**< address vacant */
96 #define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_TRANSLATION_FAILURE                                    1       /**< address translation failure */
97 #define TAPI_NETTEXT_ERR_CLASS23_NETWORK_RESOURCE_SHORTAGE                                      2       /**< network resource shortage */
98 #define TAPI_NETTEXT_ERR_CLASS23_NETWORK_FAILURE                                                                3       /**< network failure */
99 #define TAPI_NETTEXT_ERR_CLASS23_INVALID_TELESERVICE_ID                                                 4       /**< invalid teleservice id */
100 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM                                          5       /**< other network problem */
101 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_FIRST                       6       /**< other network problem more first */
102 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_LAST                        31      /**< other network problem more last */
103 #define TAPI_NETTEXT_ERR_CLASS23_NO_PAGE_RESPONSE                                                               32      /**< no page response */
104 #define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_BUSY                                                               33      /**< destination busy */
105 #define TAPI_NETTEXT_ERR_CLASS23_NO_ACK                                                                                 34      /**< no ack */
106 #define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_RESOURCE_SHORTAGE                          35      /**< destination resource shortage */
107 #define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED                                         36      /**< sms delivery postponed */
108 #define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_OUT_OF_SERVICE                                     37      /**< destination out of service */
109 #define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_NO_LONGER_AT_THIS_ADDRESS          38      /**< destination no longer at this address */
110 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM                                         39      /**< other terminal problem */
111 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_FIRST                      40      /**< other terminal problem more first */
112 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_LAST                       47      /**< other terminal problem more last */
113 #define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_FIRST                      48      /**< sms delivery postpone more first */
114 #define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_LAST                       63      /**< sms delivery postpone more last */
115 #define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_RESOURCE_SHORTAGE                                     64      /**< radio interface resource shortage */
116 #define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_INCOMPATIBLE                                                  65      /**< radio interface incompatible */
117 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM                                         66      /**< other radio interface problem */
118 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_FIRST                      67      /**< other radio interface problem more first */
119 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_LAST                       95      /**< other radio interface problem more last */
120 #define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_SIZE                                                   96      /**< unexpected parameter size */
121 #define TAPI_NETTEXT_ERR_CLASS23_SMS_ORIGINATION_DENIED                                         97      /**< sms origination denied */
122 #define TAPI_NETTEXT_ERR_CLASS23_SMS_TERMINATION_DENIED                                         98      /**< sms termination denied */
123 #define TAPI_NETTEXT_ERR_CLASS23_SUPPL_SERVICE_NOT_SUPPORTED                                    99      /**< supplementary service not supported */
124 #define TAPI_NETTEXT_ERR_CLASS23_SMS_NOT_SUPPORTED                                                              100     /**< sms not supported */
125 #define TAPI_NETTEXT_ERR_CLASS23_RESERVED_101                                                                   101     /**< reserved 101 */
126 #define TAPI_NETTEXT_ERR_CLASS23_MISSING_EXPECTED_PARM                                          102     /**< missing expected parameter */
127 #define TAPI_NETTEXT_ERR_CLASS23_MISSING_MANDATORY_PARM                                         103     /**< missing mandatory parameter value */
128 #define TAPI_NETTEXT_ERR_CLASS23_UNRECOGNIZED_PARM_VALUE                                                104     /**< unrecognized parameter value */
129 #define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_VALUE                                          105     /**< unexpected parameter value */
130 #define TAPI_NETTEXT_ERR_CLASS23_USER_DATA_SIZE_ERROR                                                   106     /**< user data size error */
131 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS                                         107     /**< other general problem */
132 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_FIRST                      108     /**< other general problem first */
133 #define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_LAST                       255     /**< other general problem last */
134
135 #define TAPI_NETTEXT_ERR_CLASS4_WAITING_FOR_TL_ACK                                                              1       /**< waiting for transport ack */
136 #define TAPI_NETTEXT_ERR_CLASS4_OUT_OF_RESOURCES                                                                2       /**< out of resource */
137 #define TAPI_NETTEXT_ERR_CLASS4_ACCESS_TOO_LARGE                                                                3       /**< access to large */
138 #define TAPI_NETTEXT_ERR_CLASS4_DTC_TOO_LARGE                                                           4       /**< DTC too large */
139 #define TAPI_NETTEXT_ERR_CLASS4_DTC_CONNECTED                                                                   5       /**< DTC connected */
140 #define TAPI_NETTEXT_ERR_CLASS4_NETWORK_NOT_READY                                                               6       /**< network not ready */
141 #define TAPI_NETTEXT_ERR_CLASS4_NO_SVC                                                                                  7       /**< no service */
142 #define TAPI_NETTEXT_ERR_CLASS4_PHONE_NOT_READY                                                         8       /**< phone not ready */
143 #define TAPI_NETTEXT_ERR_CLASS4_NOT_ALLOWED_IN_AMPS                                                     9       /**< fail to allowed in amps */
144 #define TAPI_NETTEXT_ERR_CLASS4_CANNOT_SEND_BROADCAST                                                   10      /**< fail to send broadcast */
145 #define TAPI_NETTEXT_ERR_CLASS4_INVALID_TRANSACTION_ID
146 // ********************************************************************//
147
148 /**
149  * @enum TelSmsMsgStatus_t
150  * This enumeration defines the network text status type.
151  */
152 typedef enum
153 {
154         TAPI_NETTEXT_STATUS_READ,                                       /**< MT message, stored and read */
155         TAPI_NETTEXT_STATUS_UNREAD,                                     /**< MT message, stored and unread */
156         TAPI_NETTEXT_STATUS_SENT,                                       /**< MO message, stored and  sent */
157         TAPI_NETTEXT_STATUS_UNSENT,                                     /**< MO message, stored but not sent */
158         TAPI_NETTEXT_STATUS_DELIVERED,                         /**< delivered destination */
159         TAPI_NETTEXT_STATUS_DELIVERY_UNCONFIRMED,  /**< Service centre forwarded message but is unable to confirm delivery*/
160         TAPI_NETTEXT_STATUS_MESSAGE_REPLACED,          /**< Message has been replaced*/
161         TAPI_NETTEXT_STATUS_RESERVED                            /**< Reserved for future use*/
162 } TelSmsMsgStatus_t;
163
164 /**
165  * @enum TelSmsMemStatusType
166  * This enumeration defines the memory status type.
167  */
168 typedef enum
169 {
170         TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE                = 0x01, /**< PDA Memory Available */
171         TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL                     = 0x02,  /**< PDAMemory is Full */
172         TAPI_NETTEXT_PHONE_MEMORY_STATUS_AVAILABLE      = 0x03, /**< Phone memory Available */
173         TAPI_NETTEXT_PHONE_MEMORY_STATUS_FULL                   = 0x04, /**< phone memory is full */
174 }TelSmsMemStatusType;
175
176 /**
177  * @enum TelSmsBearerType_t
178  * This enum defines the different bearer types
179  */
180 typedef enum
181 {
182         TAPI_NETTEXT_BEARER_PS_ONLY = 0x01,       /**< Send SMS only on PS Bearer */
183         TAPI_NETTEXT_BEARER_CS_ONLY,                  /**< Send SMS only on CS Bearer */
184         TAPI_NETTEXT_BEARER_PS_PREFERRED,        /**<Send SMS preferably on PS Bearer*/
185         TAPI_NETTEXT_BEARER_CS_PREFERRED ,       /**<Send SMS preferably on CS Bearer*/
186         TAPI_NETTEXT_NO_PREFERRED_BEARER         /**<SMS is sent based on default preferred bearer set at OEM based on vendor/operator preference*/
187 } TelSmsBearerType_t;
188
189
190 /**
191 * @enum TelSmsCbMsgType_t
192 * This enumeration defines the different CB message types.
193 */
194 typedef enum
195 {
196            TAPI_NETTEXT_CB_MSG_CBS = 1,             /**< Cell broadcast message */
197            TAPI_NETTEXT_CB_MSG_SCHEDULE,            /**< CB Schedule message  */
198            TAPI_NETTEXT_CB_MSG_CBS41,               /**< CBS41 type message  */
199            TAPI_NETTEXT_CB_MSG_INVALID            /**< Invalid  CB message */
200 } TelSmsCbMsgType_t;
201
202 /**
203 * @enum TelSmsEtwsMsgType_t
204 * This enumeration defines the different ETWS message types.
205 */
206 typedef enum
207 {
208            TAPI_NETTEXT_ETWS_PRIMARY = 0,             /**< Primary ETWS message */
209            TAPI_NETTEXT_ETWS_SECONDARY_GSM,            /**< GSM Secondary ETWS message  */
210            TAPI_NETTEXT_ETWS_SECONDARY_UMTS,               /**< UMTS Secondary ETWS message  */
211 } TelSmsEtwsMsgType_t;
212
213 /**
214  * @enum TelSmsResponse_t
215  * This enum defines the different response types that come in the
216  * sent status acknowledgement/notification after sending a message to the network
217  */
218 typedef enum
219 {
220         TAPI_NETTEXT_SENDSMS_SUCCESS = 0x00,     /**<Message send success*/
221         TAPI_NETTEXT_ROUTING_NOT_AVAILABLE,     /**< Message routing not available*/
222         TAPI_NETTEXT_INVALID_PARAMETER,             /**< Invalid parameter present in TPDU*/
223         TAPI_NETTEXT_DEVICE_FAILURE,                    /**< Device failure*/
224         TAPI_NETTEXT_SERVICE_RESERVED,                /**< Reserved Service*/
225         TAPI_NETTEXT_INVALID_LOCATION,                /**< Invalid location*/
226         TAPI_NETTEXT_NO_SIM,                                    /**< No SIM error*/
227         TAPI_NETTEXT_SIM_NOT_READY,            /**< SIM not ready error*/
228         TAPI_NETTEXT_NO_NETWORK_RESP,          /**< No response from network*/
229         TAPI_NETTEXT_DEST_ADDRESS_FDN_RESTRICTED,/**< Destination address restricted*/
230         TAPI_NETTEXT_SCADDRESS_FDN_RESTRICTED,   /**< Service center address restricted*/
231         TAPI_NETTEXT_RESEND_ALREADY_DONE,        /**< Resend a operation already done*/
232         TAPI_NETTEXT_SCADDRESS_NOT_AVAILABLE,    /**< SCA address not available*/
233         TAPI_NETTEXT_UNASSIGNED_NUMBER = 0x8001,          /**< Unassigned number*/
234         TAPI_NETTEXT_OPERATOR_DETERMINED_BARRING = 0x8008,/**< Operator determined barring*/
235         TAPI_NETTEXT_CALL_BARRED = 0x800A,                /**< Call barred*/
236         TAPI_NETTEXT_MESSAGE_TRANSFER_REJECTED = 0x8015,  /**< Message transfer rejected*/
237         TAPI_NETTEXT_MEMORY_CAPACITY_EXCEEDED = 0x8016,   /**< Memory capacity exceeded/memory full*/
238         TAPI_NETTEXT_DESTINAITION_OUTOFSERVICE = 0x801B,  /**< Destination number/address out of service*/
239         TAPI_NETTEXT_UNSPECIFIED_SUBSCRIBER = 0x801C,     /**< Unspecified subscriber*/
240         TAPI_NETTEXT_FACILITY_REJECTED = 0x801D,          /**< Facility rejected*/
241         TAPI_NETTEXT_UNKNOWN_SUBSCRIBER = 0x801E,         /**< Unknown subscriber*/
242         TAPI_NETTEXT_NETWORK_OUTOFORDER = 0x8026,         /**< Network out of order*/
243         TAPI_NETTEXT_TEMPORARY_FAILURE = 0x8029,          /**< Temporary failure*/
244         TAPI_NETTEXT_CONGESTION = 0x802A,                 /**< Congestion happened*/
245         TAPI_NETTEXT_RESOURCES_UNAVAILABLE = 0x802F,      /**< Resource unavailable*/
246         TAPI_NETTEXT_FACILITY_NOT_SUBSCRIBED = 0x8032,    /**< Facility not subscribed by the user*/
247         TAPI_NETTEXT_FACILITY_NOT_IMPLEMENTED = 0x8045,   /**< Facility not implemented*/
248         TAPI_NETTEXT_INVALID_REF_VALUE = 0x8051,          /**< Invalid reference value*/
249         TAPI_NETTEXT_INVALID_MSG = 0x805F,                /**< Invalid message*/
250         TAPI_NETTEXT_INVALID_MANDATORY_INFO = 0x8060,     /**< Invalid Mandatory information*/
251         TAPI_NETTEXT_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x8061,/**< Message type not implemented*/
252         TAPI_NETTEXT_MESSAGE_NOT_COMPAT_PROTOCOL = 0x8062, /**< Message not compact protocol*/
253         TAPI_NETTEXT_IE_NOT_IMPLEMENTED = 0x8063,          /**< Information element not implemented*/
254         TAPI_NETTEXT_PROTOCOL_ERROR = 0x806F,              /**< Protocol error*/
255         TAPI_NETTEXT_INTERWORKING = 0x807F,              /**< Networking error*/
256         TAPI_NETTEXT_ME_FULL = 0x8080,                     /**< SMS ME FULL */
257         TAPI_NETTEXT_SIM_FULL = 0x8081,                     /**< SMS SIM FULL */
258         TAPI_NETTEXT_TIMEOUT                                            /**< Timeout error */
259 }TelSmsResponse_t;
260
261  /** @enum  TelSmsCause_t
262  * This enum defines the different cause types that come in the
263  * sent status acknowledgement/notification after sending a message to the network
264  */
265
266 typedef enum
267 {
268
269   TAPI_NETTEXT_SUCCESS,                     /**< SMS Operation successful*/
270   TAPI_NETTEXT_INVALID_PARAMETER_FORMAT,    /**< Invalid format for some parameters passed in Data package information(TPDU)*/
271   TAPI_NETTEXT_PHONE_FAILURE,               /**<SMS operation failed due to Modem failure*/
272   TAPI_NETTEXT_SIM_BUSY,                    /**< SMS SIM operation cannot be performed as SIM is busy with some other operation*/
273   TAPI_NETTEXT_SIM_FAILURE,                 /**< SMS SIM operation cannot be performed due to SIM failure */
274   TAPI_NETTEXT_UNKNOWN,                     /**< unknown error*/
275   TAPI_NETTEXT_MEMORY_FAILURE,              /**< Error while accessing memory or allocation of memory for SMS operation.*/
276   TAPI_NETTEXT_OPERATION_NOT_SUPPORTED      /**< operation not allowed/supported*/
277 }  TelSmsCause_t;
278
279 /**
280  * @enum TelSmsSetResponse
281  * This defines the response values
282  */
283 typedef enum
284 {
285         TAPI_NETTEXT_CBSETCONFIG_RSP,     /**<  cellbroadcast config response */
286         TAPI_NETTEXT_SETPREFERREDBEARER_RSP,     /**<  set preferred bearer response */
287         TAPI_NETTEXT_SETPARAMETERS_RSP,     /**<  set parameter response */
288         TAPI_NETTEXT_SETMEMORYSTATUS_RSP,     /**<   set memory status response*/
289         TAPI_NETTEXT_SETMESSAGESTATUS_RSP,     /**<   set message status response*/
290         TAPI_NETTEXT_SETDEVICESTATUS_RSP,    /**<   set device status response*/
291         TAPI_NETTEXT_SETSCADDR_RSP,     /**<   set SCA address response */
292         TAPI_NETTEXT_SET_RSP_MAX     /**<   maximum limit*/
293 }TelSmsSetResponse;
294
295 // ************************  CDMA Features  **************************//
296  /** @enum  TelSmsIs637AlertPriority_t
297  * This enum defines the type of alerts used to distinguish different priorities
298  * of the message
299  */
300 typedef enum{
301   TAPI_NETTEXT_ALERT_PRIORITY_DEFAULT = 0,      /**< Mobile default alert */
302   TAPI_NETTEXT_ALERT_PRIORITY_LOW,                      /**< Low priority alert */
303   TAPI_NETTEXT_ALERT_PRIORITY_MEDIUM,           /**< Medium priority alert */
304   TAPI_NETTEXT_ALERT_PRIORITY_HIGH,                     /**< High priority alert */
305 } TelSmsIs637AlertPriority_t;
306
307  /** @enum  TelSmsIs637Privacy_t
308  * This enum defines the desired privacy level of the message
309  */
310 typedef enum{
311   TAPI_NETTEXT_PRIVACY_NOT_RESTRICTED = 0,      /**< Not restricted */
312   TAPI_NETTEXT_PRIVACY_RESTRICTED,                      /**< Restricted */
313   TAPI_NETTEXT_PRIVACY_CONFIDENTIAL,                    /**< Confidential */
314   TAPI_NETTEXT_PRIVACY_SECRET,                          /**< Secret */
315 } TelSmsIs637Privacy_t;
316
317  /** @enum  TelSmsIs637Priority_t
318  * This enum defines the priority level of the message
319  */
320 typedef enum{
321   TAPI_NETTEXT_PRIORITY_NORMAL = 0,                     /**< Normal */
322   TAPI_NETTEXT_PRIORITY_INTERACTIVE,                    /**< Interactive */
323   TAPI_NETTEXT_PRIORITY_URGENT,                         /**< Urgent */
324   TAPI_NETTEXT_PRIORITY_EMERGENCY,                      /**< Emergency */
325 } TelSmsIs637Priority_t;
326
327  /** @enum  TelSmsIs637LangIndicator_t
328  * This enum defines the language of the message so that the receiving mobile station can
329  * discard those messages that are not in the user's preferred language
330  */
331 typedef enum{
332   TAPI_NETTEXT_LANG_UNKNOWN = 0x0,                      /**< Unknown or unspecified */
333   TAPI_NETTEXT_LANG_ENGLISH,                                    /**< English */
334   TAPI_NETTEXT_LANG_FRENCH,                                     /**< French */
335   TAPI_NETTEXT_LANG_SPANISH,                                    /**< Spanish */
336   TAPI_NETTEXT_LANG_JAPANESE,                                   /**< Japanese */
337   TAPI_NETTEXT_LANG_KOREAN,                                     /**< Korean */
338   TAPI_NETTEXT_LANG_CHINESE,                                    /**< Chinese */
339   TAPI_NETTEXT_LANG_HEBREW,                                     /**< Hebrew */
340 } TelSmsIs637LangIndicator_t;
341
342  /** @enum  TelSmsIs637MsgDisplayMode_t
343  * This enum defines the display mode to the mobile station when to display the received message
344  */
345 typedef enum{
346   TAPI_NETTEXT_MSG_DISPLAY_IMMEDIATE = 0x0,     /**< The mobile station is to display the received message as soon as possible */
347   TAPI_NETTEXT_MSG_DISPLAY_DEFAULT,                     /**< he mobile station is to display the received message based on a pre-defined mode in the mobile station. */
348   TAPI_NETTEXT_MSG_DISPLAY_USER_INVOKE = 0x3, /**< The mobile station is to display the received message based on the mode selected by the user. */
349   TAPI_NETTEXT_MSG_DISPLAY_RESERVED,                    /**< Reserved */
350 } TelSmsIs637MsgDisplayMode_t;
351
352  /** @enum  TelSmsIs637ErrorClass_t
353  * This enum defines the error report class
354  */
355 typedef enum{
356   TAPI_NETTEXT_MSG_ERROR_CLASS_NONE = 0x0,                                      /**< None error(for SMS ack) */
357   TAPI_NETTEXT_MSG_ERROR_CLASS_TEMPORARY_ERROR = 0x2,           /**< Temporary error(for SMS ack) */
358   TAPI_NETTEXT_MSG_ERROR_CLASS_PERMANENT_ERROR = 0x3,           /**< Permanent error(for SMS ack) */
359   TAPI_NETTEXT_MSG_ERROR_CLASS_PHONE_INTERNAL_ERROR = 0x4,      /**< Phone Internal Status (for Send status) */
360 } TelSmsIs637ErrorClass_t;
361
362  /** @enum  TelSmsBroadCastCategory_t
363  * This enum defines the Broadcast Service Category
364  */
365 typedef enum{
366   TAPI_NETTEXT_CATEGORY_UNKNOWN                 = 0x00,                 /**< Unknown category */
367   TAPI_NETTEXT_CATEGORY_EMERGENCY                       = 0x01,                 /**< Emergency category */
368   TAPI_NETTEXT_CATEGORY_ADMIN                           = 0x02,                 /**< Admin category */
369   TAPI_NETTEXT_CATEGORY_MAINTENANCE             = 0x03,                 /**< Maintenance category */
370   TAPI_NETTEXT_CATEGORY_GEN_NEWS_LOC            = 0x04,                 /**< General News(Local) category */
371   TAPI_NETTEXT_CATEGORY_GEN_NEWS_REG            = 0x05,                 /**< General News(Regional) category */
372   TAPI_NETTEXT_CATEGORY_GEN_NEWS_NAT            = 0x06,                 /**< General News(National) category */
373   TAPI_NETTEXT_CATEGORY_GEN_NEWS_INT            = 0x07,                 /**< General News(International) category */
374   TAPI_NETTEXT_CATEGORY_FIN_NEWS_LOC            = 0x08,                 /**< Business/Financial News(Local) category */
375   TAPI_NETTEXT_CATEGORY_FIN_NEWS_REG            = 0x09,                 /**< Business/Financial News(Regional) category */
376   TAPI_NETTEXT_CATEGORY_FIN_NEWS_NAT            = 0x0A,                 /**< Business/Financial News(National) category */
377   TAPI_NETTEXT_CATEGORY_FIN_NEWS_INT            = 0x0B,                 /**< Business/Financial News(International) category */
378   TAPI_NETTEXT_CATEGORY_SPT_NEWS_LOC            = 0x0C,                 /**< Sports News(Local) category */
379   TAPI_NETTEXT_CATEGORY_SPT_NEWS_REG            = 0x0D,                 /**< Sports News(Regional) category */
380   TAPI_NETTEXT_CATEGORY_SPT_NEWS_NAT            = 0x0E,                 /**< Sports News(National) category */
381   TAPI_NETTEXT_CATEGORY_SPT_NEWS_INT            = 0x0F,                 /**< Sports News(International) category */
382   TAPI_NETTEXT_CATEGORY_ENT_NEWS_LOC            = 0x10,                 /**< Entertainment News(Local) category */
383   TAPI_NETTEXT_CATEGORY_ENT_NEWS_REG            = 0x11,                 /**< Entertainment News(Regional) category */
384   TAPI_NETTEXT_CATEGORY_ENT_NEWS_NAT            = 0x12,                 /**< Entertainment News(National) category */
385   TAPI_NETTEXT_CATEGORY_ENT_NEWS_INT            = 0x13,                 /**< Entertainment News(International) category */
386   TAPI_NETTEXT_CATEGORY_LOC_WEATHER             = 0x14,                 /**< Local Weather category */
387   TAPI_NETTEXT_CATEGORY_AREA_TRAFFIC            = 0x15,                 /**< Area Traffic Reports category */
388   TAPI_NETTEXT_CATEGORY_AIRPORT_SCHED           = 0x16,                 /**< Local Airport Flight Schedules category */
389   TAPI_NETTEXT_CATEGORY_RESTAURANTS             = 0x17,                 /**< Restaurants category */
390   TAPI_NETTEXT_CATEGORY_LODGINGS                        = 0x18,                 /**< Lodgings category */
391   TAPI_NETTEXT_CATEGORY_RETAILS                 = 0x19,                 /**< Retail Directory category */
392   TAPI_NETTEXT_CATEGORY_ADS                             = 0x1A,                 /**< Advertisements category */
393   TAPI_NETTEXT_CATEGORY_STOCK_QUOTES            = 0x1B,                 /**< Stock Quotes category */
394   TAPI_NETTEXT_CATEGORY_JOBS                            = 0x1C,                 /**< Employment Opportunities category */
395   TAPI_NETTEXT_CATEGORY_MEDICAL                 = 0x1D,                 /**< Medical/Health/Hospitals category */
396   TAPI_NETTEXT_CATEGORY_TECH_NEWS                       = 0x1E,                 /**< Technology News category */
397   TAPI_NETTEXT_CATEGORY_MULTI                           =  0x1F,                        /**< Multi-category */
398 } TelSmsBroadCastCategory_t;
399
400 /** @enum  TelSmsMsgType_t
401  * This enum defines the type of IS637 message
402  */
403 typedef enum{
404   TAPI_NETTEXT_MESSAGETYPE_DELIVER = 0x01,                                      /**< sms deliver message  */
405   TAPI_NETTEXT_MESSAGETYPE_SUBMIT = 0x02,                                       /**< sms submit message  */
406   TAPI_NETTEXT_MESSAGETYPE_CANCEL = 0x03,                                       /**< sms cancellation message  */
407   TAPI_NETTEXT_MESSAGETYPE_DELIVERY_ACK = 0x04,                         /**< sms delivery acknowledgment message  */
408   TAPI_NETTEXT_MESSAGETYPE_USER_ACK = 0x05,                                     /**< sms user acknowledgment message  */
409 } TelSmsMsgType_t;
410
411 /** @enum  TelSmsIs637DigitMode_t
412  * This enum defines the type of address whether it is 4-bit mode or 8-bit mode
413  */
414 typedef enum{
415   TAPI_NETTEXT_DIGITMODE_4BITDTMF       = 0x00,                                 /**< 4-bit mode  */
416   TAPI_NETTEXT_DIGITMODE_8BITCODE       = 0x01,                                 /**< 8-bit mode  */
417 } TelSmsIs637DigitMode_t;
418
419 /** @enum  TelSmsIs637NumberMode_t
420  * This enum defines the mode of address number to indicate whether the address type is as defined in ANSI TI.607 or is a data network address
421  */
422 typedef enum{
423   TAPI_NETTEXT_NUMMODE_NONE_DATANETWORK =       0x00,           /**< in ANSI TI.607 */
424   TAPI_NETTEXT_NUMMODE_DATANETWORK = 0x01,                                      /**< in Data Network */
425 } TelSmsIs637NumberMode_t;
426
427 /** @enum  TelSmsIs637NumberType_t
428  * This enum defines the type of address
429  */
430 typedef enum{
431   TAPI_NETTEXT_NUMBER_TYPE_UNKNOWN          = 0x00,                             /**<  Unknown */
432   TAPI_NETTEXT_NUMBER_TYPE_INTERNATIONAL    = 0x01,                     /**<  International number*/
433   TAPI_NETTEXT_NUMBER_TYPE_NATIONAL         = 0x02,                             /**<  National number */
434   TAPI_NETTEXT_NUMBER_TYPE_NETWORK          = 0x03,                             /**<  Abbreviated number */
435   TAPI_NETTEXT_NUMBER_TYPE_SUBSCRIBER       = 0x04,                     /**< Abbreviated number */
436   TAPI_NETTEXT_NUMBER_TYPE_RESERVED_5       = 0x05,                     /**<  Reserved */
437   TAPI_NETTEXT_NUMBER_TYPE_ABBREVIATED       = 0x06,                    /**<  Abbreviated number */
438   TAPI_NETTEXT_NUMBER_TYPE_RESERVED_7       = 0x07,                     /**<  Reserved */
439   TAPI_NETTEXT_NUMBER_TYPE_IP                       = 0x11,                     /**<  Internet Protocol(RFC 791) */
440   TAPI_NETTEXT_NUMBER_TYPE_EMAILADDR        = 0x12,                     /**<  Internet Email Address(RFC 822) */
441 } TelSmsIs637NumberType_t;
442
443 /** @enum  TelSmsIs637NumberPlan_t
444  * This enum defines the plan of address
445  */
446 typedef enum{
447   TAPI_NETTEXT_NUMBER_PLAN_UNKNOWN                          = 0x00,             /**<  Unknown */
448   TAPI_NETTEXT_NUMBER_PLAN_TELEPHONY                = 0x01,             /**< ISDN/Telephony numbering plan */
449   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_2               = 0x02,             /**<  Reserved */
450   TAPI_NETTEXT_NUMBER_PLAN_DATA                         = 0x03,                 /**< Data numbering plan */
451   TAPI_NETTEXT_NUMBER_PLAN_TELEX                              = 0x04,           /**< CTelex numbering plan */
452   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_5               = 0x05,             /**<  Reserved */
453   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_6               = 0x06,             /**<  Reserved */
454   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_7               = 0x07,             /**<  Reserved */
455   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_8               = 0x08,             /**<  Reserved */
456   TAPI_NETTEXT_NUMBER_PLAN_PRIVATE                          = 0x09,             /**<  Private numbering plan */
457   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_10            = 0x0A,                       /**<  Reserved */
458   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_11            = 0x0B,                       /**<  Reserved */
459   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_12            = 0x0C,                       /**<  Reserved */
460   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_13            = 0x0D,                       /**<  Reserved */
461   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_14            = 0x0E,                       /**<  Reserved */
462   TAPI_NETTEXT_NUMBER_PLAN_RESERVED_15            = 0x0F,                       /**<  Reserved */
463 } TelSmsIs637NumberPlan_t;
464
465 /** @enum  TelSmsIs637SubAddressType_t
466  * This enum defines the plan of address
467  */
468 typedef enum{
469   TAPI_NETTEXT_SUBADDR_NSAP                                       = 0x00,       /**< NSAP ( CCITT Recommendation X.213 or ISO 8348 AD2 ) */
470   TAPI_NETTEXT_SUBADDR_USER_SPECIFIED               = 0x01,     /**<  User-specified */
471 } TelSmsIs637SubAddressType_t;
472
473 /**
474  * @enum telephony_sms_3gpp_type
475  * This defines the type of 3gpp
476  */
477 typedef enum  {
478         TAPI_NETTEXT_NETTYPE_3GPP = 0x01,                                               /**< 3gpp type */
479         TAPI_NETTEXT_NETTYPE_3GPP2 = 0x02,                                      /**< 3gpp2 type (CDMA) */
480 } TelSms3gppType_t;
481
482 // ********************************************************************//
483
484 /**
485  * This structure defines the different parameters of  CB configuration
486  */
487 typedef struct {
488  unsigned short FromMsgId; /**< Starting point of the range of CBS message ID */
489  unsigned short ToMsgId; /**< Ending point of the range of CBS message ID */
490  unsigned char Selected; /**< 0x00 . Not selected. 0x01 . Selected */
491 } TelSmsCbMsgInfo3gpp_t;
492
493 typedef struct {
494  unsigned short CBCategory; /**< CB Service category */
495  unsigned short CBLanguage; /**< Language indicator value
496                                                                 . 0x00 . LANGUAGE_UNKNOWN .
497                                                                         Unknown or Unspecified
498                                                                 . 0x01 . LANGUAGE_ENGLISH . English
499                                                                 . 0x02 . LANGUAGE_FRENCH . French
500                                                                 . 0x03 . LANGUAGE_SPANISH . Spanish
501                                                                 . 0x04 . LANGUAGE_JAPANESE . Japanese
502                                                                 . 0x05 . LANGUAGE_KOREAN . Korean
503                                                                 . 0x06 . LANGUAGE_CHINESE . Chinese
504                                                                 . 0x07 . LANGUAGE_HEBREW . Hebrew*/
505  unsigned char Selected; /**< 0x00 . Not selected. 0x01 . Selected */
506 } TelSmsCbMsgInfo3gpp2_t;
507
508 typedef union {
509         TelSmsCbMsgInfo3gpp_t Net3gpp; /**< 3GPP Broadcast Configuration Information */
510         TelSmsCbMsgInfo3gpp2_t Net3gpp2; /**< 3GPP2 Broadcast Configuration Information, CDMA*/
511 } TelSmsCbMsgInfo_t;
512
513 typedef struct {
514         int Net3gppType;  /**< Type of 3gpp, 0x01 . 3gpp. 0x02 . 3gpp2(CDMA) */
515         int CBEnabled; /**< CB service state. If cb_enabled is true then cell broadcast service will be enabled and underlying modem will enable CB Channel to receiving CB messages. Otherwise CB service will be disabled, underlying modem will deactivate the CB channel. (enabled/disabled) */
516         unsigned char MsgIdMaxCount; /**< CB Channel List Max Count For Response */
517         int MsgIdRangeCount; /**< Range of CB message ID count */
518         TelSmsCbMsgInfo_t MsgIDs[TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX]; /**< Range of CB message ID information */
519 } TelSmsCbConfig_t;
520
521 /**
522  * This structure defines the properties of a dialing number
523  * Type of Number, Numbering Plan Indicator, length and the actual number.
524  */
525 typedef struct {
526         unsigned int DialNumLen; /**< length of address. If Service center address is not set, then this will be zero */
527         TelSimTypeOfNum_t Ton; /**< Type of number*/
528         TelSimNumberingPlanIdentity_t Npi; /**<Numbering plan identification*/
529         unsigned char szDiallingNum[TAPI_SIM_SMSP_ADDRESS_LEN + 1]; /**< destination address. If Address not set, then set to 0xFF */
530 } TelSmsAddressInfo_t;
531
532 /**
533  * This structure defines different fields involved in setting the parameters of
534  * a particular sms in EFsmsp.
535  */
536 typedef struct {
537
538         unsigned char RecordIndex; /**< Index*/
539         unsigned char RecordLen; /**< SMS Parameter Record length*/
540         unsigned long AlphaIdLen; /**< Alpha id length */
541         char szAlphaId[TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1]; /**< Alpha id .It is a unique identifier for each row/record in EFsmsp */
542         unsigned char ParamIndicator; /**< SMS parameter indicator is a 1 byte value. Each bit in this value indicates the presence/absence of the sms header parameters.If the parameter is present the corresponding bit value is set to 0.If the parameter is absent then it is set as 1.Refer 3GPP TS 31.02 :4.4.23 */
543         TelSmsAddressInfo_t TpDestAddr; /**< TP-destination address (TP-DA) */
544         TelSmsAddressInfo_t TpSvcCntrAddr; /**< TP-service center address */
545         unsigned short TpProtocolId; /**< TP-protocol Id */
546         unsigned short TpDataCodingScheme; /**< TP-data coding scheme */
547         unsigned short TpValidityPeriod; /**< TP-validity period */
548 } TelSmsParams_t;
549
550 /**
551  * This structure defines the fields related to an Sms like SIM index, TPDU  and length
552  */
553 typedef struct {
554         unsigned char Sca[TAPI_SIM_SMSP_ADDRESS_LEN]; /**< Service Centre address - an optional parameter. If this parameter is not present, then this field will be Null.If present, the valid service centre address information is filled as per 3GPP TS23.040 9.1.2.5 Address fields */
555         int MsgLength; /**< Size of array szData (which is actual TPDU message) */
556         unsigned char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1]; /**<SMS TPDU message */
557 } TelSmsDatapackageInfo_t;
558
559 /**
560  *This structure defines the data Related to SimIndex,MessageStatus and SMS Data Stored.
561  */
562 typedef struct {
563         int SimIndex; /**< Index where SMS is stored. */
564         TelSmsMsgStatus_t MsgStatus; /**< Message status.*/
565         TelSmsDatapackageInfo_t SmsData; /**<SMS message */
566 } TelSmsData_t;
567
568 /**
569  * This structure defines the different parameters that are related to the message count
570  *in a particular memory(Phone/SIM)
571  */
572 typedef struct {
573         unsigned int TotalCount; /**< Total count of messages stored in SIM*/
574         int UsedCount; /**< Stored message count in SIM in SIM*/
575         int IndexList[TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX]; /**< Message index list stored in SIM. And the maximum size of this array can be of totalCount.This array contains the list of index values in which the messages are stored.i.e. index_list[totalcount] = [2,3] denotes that indexs 2 and 3 are stored(valid) and others not(empty).*/
576 } TelSmsStoredMsgCountInfo_t;
577
578 /**
579  * This structure defines a cell broadcast message.
580  */
581 typedef struct {
582
583         TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast  message type */
584         unsigned short Length; /**<Size of array szMsgData (which is actual TPDU message) */
585         char szMsgData[TAPI_NETTEXT_CB_SIZE_MAX + 1]; /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
586 } TelSmsCbMsg_t;
587
588 /**
589  * This structure defines a ETWS message.
590  */
591 typedef struct {
592         TelSmsEtwsMsgType_t EtwsMsgType; /**< Cell Broadcast  message type */
593         unsigned short Length; /**<Size of array szMsgData (which is actual TPDU message) */
594         char szMsgData[TAPI_NETTEXT_ETWS_SIZE_MAX + 1]; /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
595 } TelSmsEtwsMsg_t;
596
597 // ************************  CDMA Features  **************************//
598 /**
599  *  This structure defines cause code as an indication whether an SMS error has occurred and
600  *  if so, whether the condition is considered temporary or permanent
601  **/
602 typedef struct {
603         unsigned char ReplySeqNumber; /**< Reply sequence number */
604         TelSmsIs637ErrorClass_t ErrClass; /**< Error report class */
605         unsigned char Cause; /**< Error cause identifier */
606 } TelSmsIs637CauseCode_t;
607
608 /**
609  * This structure defines the parameters of address and its type
610  */
611 typedef struct {
612         TelSmsIs637DigitMode_t Digit; /**< Digit mode indicator (0x00:4bit_dtmf, 0x01:8bit_code) */
613         TelSmsIs637NumberMode_t NumberMode; /**< Number mode indicator (0x00:ANSI TI607, 0x01:Data network) */
614         TelSmsIs637NumberType_t NumberType; /**< Type of number */
615         TelSmsIs637NumberPlan_t NumberPlan; /**< Numbering plan */
616         unsigned char szAddrLength; /**< The number of CHARi */
617         unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< The address digit or character */
618 } TelSmsIs637Address_t;
619
620 /**
621  * This structure defines the parameters of subaddress of originator and destination
622  */
623 typedef struct {
624         TelSmsIs637SubAddressType_t SubType; /**< Subaddress type */
625         unsigned char Odd; /**< Odd/even indicator */
626         unsigned char szAddrLength; /**< The number of CHARi */
627         unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< A subaddress octet */
628 } TelSmsIs637SubAddress_t;
629
630 /**
631  * This structure defines the message center time stamp may be include
632  * with SMS message sent from a message center
633  */
634 typedef struct {
635         unsigned int year; /**< Year - if the year is 2002, the year field contains 0x02 */
636         unsigned int month; /**< Month (1 ~ 12) */
637         unsigned int day; /**< Day (1 ~ 31) */
638         unsigned int hours; /**< Hours (0 ~ 23) */
639         unsigned int minutes; /**< Minute (0 ~ 59) */
640         unsigned int seconds; /**< Seconds (0 ~ 59) */
641 } TelSmsTimeStamp_t;
642
643 /**
644  * The structure defines the parameter of SMS submit message
645  */
646 typedef struct {
647         TelSmsIs637Address_t DstAddr; /**< Destination address */
648         TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
649         unsigned short TeleService; /**< Teleservice Identifier */
650         int bBearerReplySeqRequest; /**< Bearer reply sequence request */
651         unsigned char ReplySeqNumber; /**< Reply sequence number */
652         unsigned short MsgId; /**< Message identifier */
653         unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
654         unsigned short MsgLength; /**< Message length */
655         unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
656         TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute (not supported) */
657         unsigned char ValidityPeriodRel; /**< Validity period - Relative (not supported) */
658         TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute */
659         unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative */
660         TelSmsIs637Priority_t Priority; /**< Priority indicator */
661         TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
662         int bUserAckRequest; /**< User acknowledge request */
663         int bDeliveryAckRequest; /**< Delivery acknowledge request */
664         TelSmsIs637AlertPriority_t AlertPriority; /**< Alert priority of message */
665         TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
666         TelSmsIs637Address_t CallBackNumber; /**< Callback number address */
667 } TelSmsIs637OutSubmit_t;
668
669 /**
670  * The structure defines the parameter of SMS acknowledgement message for submit
671  */
672 typedef struct {
673         TelSmsIs637Address_t DstAddr; /**< Destination address */
674         TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
675         unsigned short TeleService; /**< Teleservice Identifier */
676         int bBearerReplySeqRequest; /**< Bearer reply sequence request */
677         unsigned char ReplySeqNumber; /**< Reply sequence number */
678         unsigned short MsgId; /**< Message identifier */
679         unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
680         unsigned short MsgLength; /**< Message length */
681         unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
682         unsigned char UserResponseCode; /**< User response code */
683 } TelSmsIs637OutAck_t;
684
685 /**
686  * The structure defines the parameter of SMS cancellation message
687  */
688 typedef struct {
689         TelSmsIs637Address_t DstAddr; /**< Destination address */
690         TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
691         unsigned short TeleService; /**< Teleservice Identifier */
692         int bBearerReplySeqRequest; /**< Bearer reply sequence request */
693         unsigned char ReplySeqNumber; /**< Reply sequence number */
694         unsigned short MsgId; /**< Message identifier */
695 } TelSmsIs637OutCancel_t;
696
697 /**
698  * The structure defines the parameter of SMS devivery message
699  */
700 typedef struct {
701         TelSmsIs637Address_t OrigAddr; /**< Origination address */
702         TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
703         unsigned short TeleService; /**< Teleservice Identifier */
704         int bBearerReplySeqRequest; /**< Bearer reply sequence request */
705         unsigned char ReplySeqNumber; /**< Reply sequence number */
706         unsigned short MsgId; /**< Message identifier */
707         unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
708         unsigned short MsgLength; /**< Message length */
709         unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
710         TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
711         TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
712         unsigned char ValidityPeriodRel; /**< Validity period - Relative */
713         TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute (not supported) */
714         unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative (not supported) */
715         TelSmsIs637Priority_t Priority; /**< Priority indicator */
716         TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
717         unsigned char NumMsg; /**< Number of voice mail (0-99) */
718         int bUserAckRequest; /**< User acknowledge request */
719         int bDeliveryAckRequest; /**< Delivery acknowledge request */
720         TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
721         TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
722         TelSmsIs637Address_t CallBackNumer; /**< Callback number address */
723         TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
724 } TelSmsIs637InDeliver_t;
725
726 /**
727  * The structure defines the parameter of SMS acknowledge message for deliver
728  */
729 typedef struct {
730         TelSmsIs637Address_t OrigAddr; /**< Origination address */
731         TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
732         unsigned short TeleService; /**< Teleservice Identifier */
733         int bBearerReplySeqRequest; /**< Bearer reply sequence request */
734         unsigned char ReplySeqNumber; /**< Reply sequence number */
735         unsigned short MsgId; /**< Message identifier */
736         unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
737         unsigned short MsgLength; /**< Message length */
738         unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
739         unsigned char UserResponseCode; /**< User response code */
740         TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
741 } TelSmsIs637InAck_t;
742
743 /**
744  * The structure defines the parameter of SMS acknowledge message from message center
745  */
746 typedef struct {
747         TelSmsIs637Address_t OrigAddr; /**< Origination address */
748         TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
749         unsigned short TeleService; /**< Teleservice Identifier */
750         int bBearerReplySeqRequest; /**< Bearer reply sequence request */
751         unsigned char ReplySeqNumber; /**< Reply sequence number */
752         unsigned short MsgId; /**< Message identifier */
753         unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
754         unsigned short MsgLength; /**< Message length */
755         unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
756         TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
757 } TelSmsIs637InDeliverAck_t;
758
759 /**
760  * The structure defines the parameter of SMS broadcast message
761  */
762 typedef struct {
763         TelSmsBroadCastCategory_t ServiceCategory; /**< Broadcast service category */
764         unsigned short MsgId; /**< Message identifier */
765         int bBearerReplySeqRequest; /**< Bearer reply sequence request */
766         unsigned char ReplySeqNumber; /**< Reply sequence number */
767         unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
768         unsigned short MsgLength; /**< Message length */
769         unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
770         TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
771         TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
772         unsigned char ValidityPeriodRel; /**< Validity period - Relative */
773         TelSmsIs637Priority_t Priority; /**< Priority indicator */
774         TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
775         TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
776         TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
777 } TelSmsIs637InBroadCast_t;
778
779 /**
780  * The structure defines the type of SMS message as union
781  */
782 typedef union {
783         TelSmsIs637OutSubmit_t OutSubmit; /**< Outgoing Submit message */
784         TelSmsIs637OutAck_t OutAck; /**< Outgoing Acknowledge message */
785         TelSmsIs637OutCancel_t OutCancel; /**< Outgoing Cancel message */
786         TelSmsIs637InDeliver_t InDeliver; /**< Incoming Delivery message */
787         TelSmsIs637InAck_t InAck; /**< Incoming Acknowledge message */
788         TelSmsIs637InDeliverAck_t InDeliverAck; /**< Incoming Delivery Acknowledge message */
789         TelSmsIs637InBroadCast_t InBc; /**< Incoming Broadcast message */
790 } TelSmsMessage_t;
791
792 /**
793  * The structure defines the parameter of entire SMS message of each type
794  */
795 typedef struct {
796         int ParamMask; /**< Parameter ID mask */
797         TelSmsMsgType_t MsgType; /**< Message type */
798         TelSmsMessage_t MsgData; /**< Message data */
799 } TelSmsMsgInfo_t;
800 // ********************************************************************//
801
802 struct tel_noti_sms_incomming_msg {
803         char Sca[TAPI_SIM_SMSP_ADDRESS_LEN];
804         int MsgLength;
805         char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
806 };
807
808 struct tel_noti_sms_incomming_cb_msg {
809         TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast  message type */
810         short Length; /**<Size of array szMsgData (which is actual TPDU message) */
811         char szMsgData[TAPI_NETTEXT_CB_PAGE_SIZE_MAX + 1]; /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
812 };
813
814 #ifdef __cplusplus
815 }
816 #endif
817
818
819 #endif  // _TEL_NETTEXT_H_
820
821 /**
822  * @}
823 */