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