2.0_beta
[framework/messaging/msg-service.git] / include / common / MsgInternalTypes.h
1 /*
2 * Copyright 2012  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://www.tizenopensource.org/license
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef MSG_INTERNAL_TYPES_H
18 #define MSG_INTERNAL_TYPES_H
19
20 /**
21  *      @file           MsgInternalTypes.h
22  *      @brief          Defines types of messaging framework
23  *      @version        1.0
24  */
25
26 /*==================================================================================================
27                                          INCLUDE FILES
28 ==================================================================================================*/
29 #include "MsgMmsTypes.h"
30
31
32 /*==================================================================================================
33                                     DEFINES
34 ==================================================================================================*/
35 #define MSG_DATA_ROOT_PATH              "/opt/data/msg-service/"
36 #define MSG_DATA_PATH                           MSG_DATA_ROOT_PATH"msgdata/"
37 #define MSG_SMIL_FILE_PATH              MSG_DATA_ROOT_PATH"smildata/"
38 #define MSG_IPC_DATA_PATH                       MSG_DATA_ROOT_PATH"ipcdata/"
39 #define MSG_THUMBNAIL_PATH              MSG_DATA_PATH"thumbnails/"
40 #define MAX_FULL_PATH_SIZE              320     // max length for internal file path
41 #define VALID_ADDRESS_LEN               8
42 #define MAX_PRECONFIG_NUM               8
43 #define MAX_THREAD_ADDR_LEN     40
44 #define MAX_THREAD_NAME_LEN     195
45 #define MAX_THREAD_DATA_LEN     128
46
47 #define SMS_MINIMUM_SPACE       (3 * 1024)
48 #define MMS_MINIMUM_SPACE       (600 * 1024)
49
50 /*vconf keys*/
51 #define MSG_SIM_IMSI                    "memory/private/msg-service/sim_imsi"
52 #define MSG_SIM_CHANGED "memory/private/msg-service/sim_changed"
53
54
55 #define DEFAULT_SETTING_PATH                            "db/private/msg-service"
56
57 #define DEFAULT_GENERAL_OPT_PATH                DEFAULT_SETTING_PATH"/general"
58 #define DEFAULT_SMS_SEND_OPT_PATH       DEFAULT_SETTING_PATH"/sms_send"
59 #define DEFAULT_SMSC_INFO_PATH                  DEFAULT_SETTING_PATH"/smsc"
60 #define DEFAULT_MMS_SEND_OPT_PATH       DEFAULT_SETTING_PATH"/mms_send"
61 #define DEFAULT_MMS_RECV_OPT_PATH       DEFAULT_SETTING_PATH"/mms_recv"
62 #define DEFAULT_MMS_STYLE_OPT_PATH      DEFAULT_SETTING_PATH"/mms_style"
63 #define DEFAULT_PUSH_MSG_OPT_PATH       DEFAULT_SETTING_PATH"/push_msg"
64 #define DEFAULT_CB_MSG_OPT_PATH         DEFAULT_SETTING_PATH"/cb_msg"
65 #define DEFAULT_VOICE_MAIL_OPT_PATH     DEFAULT_SETTING_PATH"/voice_mail"
66 #define DEFAULT_MSGSIZE_OPT_PATH                DEFAULT_SETTING_PATH"/size_opt"
67 #define DEFAULT_SIM_COUNT_PATH                  DEFAULT_SETTING_PATH"/sim_count"
68
69 #define MSG_KEEP_COPY                           DEFAULT_GENERAL_OPT_PATH"/keep_copy"
70 #define MSG_ALERT_TONE                          VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT
71 #define MSG_AUTO_ERASE                          DEFAULT_GENERAL_OPT_PATH"/auto_erase"
72 #define MSG_BLOCK_MESSAGE               DEFAULT_GENERAL_OPT_PATH"/block_msg"
73 #define CONTACT_SYNC_TIME               DEFAULT_GENERAL_OPT_PATH"/contact_sync_time"
74
75 #define SMS_SEND_DCS                                                    DEFAULT_SMS_SEND_OPT_PATH"/dcs"
76 #define SMS_SEND_NETWORK_MODE   VCONFKEY_MESSAGE_NETWORK_MODE
77 #define SMS_SEND_REPLY_PATH                     DEFAULT_SMS_SEND_OPT_PATH"/reply_path"
78 #define SMS_SEND_DELIVERY_REPORT        DEFAULT_SMS_SEND_OPT_PATH"/delivery_report"
79 #define SMS_SEND_SAVE_STORAGE           DEFAULT_SMS_SEND_OPT_PATH"/save_storage"
80
81 #define SMSC_TOTAL_COUNT                DEFAULT_SMSC_INFO_PATH"/total_count"
82 #define SMSC_SELECTED                   DEFAULT_SMSC_INFO_PATH"/selected"
83 #define SMSC_PID                                                DEFAULT_SMSC_INFO_PATH"/pid"
84 #define SMSC_VAL_PERIOD         DEFAULT_SMSC_INFO_PATH"/val_period"
85 #define SMSC_NAME                                       DEFAULT_SMSC_INFO_PATH"/name"
86 #define SMSC_TON                                                DEFAULT_SMSC_INFO_PATH"/ton"
87 #define SMSC_NPI                                                DEFAULT_SMSC_INFO_PATH"/npi"
88 #define SMSC_ADDRESS                            DEFAULT_SMSC_INFO_PATH"/address"
89
90 #define MMS_SEND_MSG_CLASS                                                      DEFAULT_MMS_SEND_OPT_PATH"/msg_class"
91 #define MMS_SEND_PRIORITY                                                               DEFAULT_MMS_SEND_OPT_PATH"/priority"
92 #define MMS_SEND_EXPIRY_TIME                                                    DEFAULT_MMS_SEND_OPT_PATH"/expiry_time"
93 #define MMS_SEND_CUSTOM_DELIVERY                                DEFAULT_MMS_SEND_OPT_PATH"/custom_delivery"
94 #define MMS_SEND_DELIVERY_TIME                                          DEFAULT_MMS_SEND_OPT_PATH"/delivery_time"
95 #define MMS_SEND_SENDER_VISIBILITY                              DEFAULT_MMS_SEND_OPT_PATH"/sender_visibility"
96 #define MMS_SEND_DELIVERY_REPORT                                        DEFAULT_MMS_SEND_OPT_PATH"/delivery_report"
97 #define MMS_SEND_READ_REPLY                                                     DEFAULT_MMS_SEND_OPT_PATH"/read_reply"
98 #define MMS_SEND_KEEP_COPY                                                      DEFAULT_MMS_SEND_OPT_PATH"/keep_copy"
99 #define MMS_SEND_BODY_REPLYING                                          DEFAULT_MMS_SEND_OPT_PATH"/body_replying"
100 #define MMS_SEND_HIDE_RECIPIENTS                                        DEFAULT_MMS_SEND_OPT_PATH"/hide_recipients"
101 #define MMS_SEND_REPORT_ALLOWED                         DEFAULT_MMS_SEND_OPT_PATH"/report_allowed"
102 #define MMS_SEND_REPLY_CHARGING                                 DEFAULT_MMS_SEND_OPT_PATH"/reply_charging"
103 #define MMS_SEND_REPLY_CHARGING_DEADLINE        DEFAULT_MMS_SEND_OPT_PATH"/reply_charging_deadline"
104 #define MMS_SEND_REPLY_CHARGING_SIZE                    DEFAULT_MMS_SEND_OPT_PATH"/reply_charging_size"
105 #define MMS_SEND_CREATION_MODE                                  DEFAULT_MMS_SEND_OPT_PATH"/creation_mode"
106
107 #define MMS_RECV_HOME_NETWORK           DEFAULT_MMS_RECV_OPT_PATH"/home_network"
108 #define MMS_RECV_ABROAD_NETWORK DEFAULT_MMS_RECV_OPT_PATH"/abroad_network"
109 #define MMS_RECV_READ_RECEIPT                   DEFAULT_MMS_RECV_OPT_PATH"/read_receipt"
110 #define MMS_RECV_DELIVERY_RECEIPT       DEFAULT_MMS_RECV_OPT_PATH"/delivery_receipt"
111 #define MMS_RECV_REJECT_UNKNOWN         DEFAULT_MMS_RECV_OPT_PATH"/reject_unknown"
112 #define MMS_RECV_REJECT_ADVERTISE       DEFAULT_MMS_RECV_OPT_PATH"/reject_advertisement"
113
114 #define MMS_STYLE_FONT_SIZE                                                     DEFAULT_MMS_STYLE_OPT_PATH"/font_size"
115 #define MMS_STYLE_FONT_STYLE_BOLD                       DEFAULT_MMS_STYLE_OPT_PATH"/font_style/bold"
116 #define MMS_STYLE_FONT_STYLE_ITALIC                     DEFAULT_MMS_STYLE_OPT_PATH"/font_style/italic"
117 #define MMS_STYLE_FONT_STYLE_UNDERLINE  DEFAULT_MMS_STYLE_OPT_PATH"/font_style/underline"
118 #define MMS_STYLE_FONT_COLOR_RED                        DEFAULT_MMS_STYLE_OPT_PATH"/font_color/red"
119 #define MMS_STYLE_FONT_COLOR_GREEN              DEFAULT_MMS_STYLE_OPT_PATH"/font_color/green"
120 #define MMS_STYLE_FONT_COLOR_BLUE                       DEFAULT_MMS_STYLE_OPT_PATH"/font_color/blue"
121 #define MMS_STYLE_FONT_COLOR_HUE                        DEFAULT_MMS_STYLE_OPT_PATH"/font_color/hue"
122 #define MMS_STYLE_BG_COLOR_RED                          DEFAULT_MMS_STYLE_OPT_PATH"/bg_color/red"
123 #define MMS_STYLE_BG_COLOR_GREEN                        DEFAULT_MMS_STYLE_OPT_PATH"/bg_color/green"
124 #define MMS_STYLE_BG_COLOR_BLUE                         DEFAULT_MMS_STYLE_OPT_PATH"/bg_color/blue"
125 #define MMS_STYLE_BG_COLOR_HUE                          DEFAULT_MMS_STYLE_OPT_PATH"/bg_color/hue"
126 #define MMS_STYLE_PAGE_DUR                                                      DEFAULT_MMS_STYLE_OPT_PATH"/page_dur"
127 #define MMS_STYLE_PAGE_CUSTOM_DUR                       DEFAULT_MMS_STYLE_OPT_PATH"/page_custom_dur"
128 #define MMS_STYLE_PAGE_DUR_MANUAL                       DEFAULT_MMS_STYLE_OPT_PATH"/page_dur_manual"
129
130 #define PUSH_RECV_OPTION                                DEFAULT_PUSH_MSG_OPT_PATH"/recv_option"
131 #define PUSH_SERVICE_TYPE                               DEFAULT_PUSH_MSG_OPT_PATH"/service_load"
132
133 #define CB_RECEIVE                                              DEFAULT_CB_MSG_OPT_PATH"/receive"
134 #define CB_ALL_CHANNEL                          DEFAULT_CB_MSG_OPT_PATH"/all_channel"
135 #define CB_MAX_SIM_COUNT                        DEFAULT_CB_MSG_OPT_PATH"/max_sim_count"
136 #define CB_CHANNEL_COUNT                        DEFAULT_CB_MSG_OPT_PATH"/channel_count"
137 #define CB_CHANNEL_ACTIVATE             DEFAULT_CB_MSG_OPT_PATH"/channel_activate"
138 #define CB_CHANNEL_ID                                   DEFAULT_CB_MSG_OPT_PATH"/channel_id"
139 #define CB_CHANNEL_NAME                 DEFAULT_CB_MSG_OPT_PATH"/channel_name"
140 #define CB_LANGUAGE                                     DEFAULT_CB_MSG_OPT_PATH"/language"
141
142 #define VOICEMAIL_NUMBER                                DEFAULT_VOICE_MAIL_OPT_PATH"/voice_mail_number"
143
144 #define MSGSIZE_OPTION                                  DEFAULT_MSGSIZE_OPT_PATH"/msg_size"
145
146 #define SIM_USED_COUNT                                  DEFAULT_SIM_COUNT_PATH"/used_cnt"
147 #define SIM_TOTAL_COUNT                         DEFAULT_SIM_COUNT_PATH"/total_cnt"
148
149
150 /*==================================================================================================
151                                          TYPES
152 ==================================================================================================*/
153
154 /**
155  *      @brief  Represents a message main type. \n
156  *      The values for this type SHOULD be in _MSG_MAIN_TYPE_E.
157  */
158 typedef unsigned char MSG_MAIN_TYPE_T;
159
160
161 /**
162  *      @brief  Represents a message sub type. \n
163  *      Each main type of a message can be divided into some sub types. \n
164  *      For instance of SMS, the message sub type can be one of the NORMAL, WAPPUSH, CB and so on. \n
165  *      The values for this type SHOULD be in _MSG_SUB_TYPE_E.
166  */
167 typedef unsigned char MSG_SUB_TYPE_T;
168
169
170 /**
171  *      @brief  Represents a message class. \n
172  *      The values for this type SHOULD be in _MSG_CLASS_TYPE_E.
173  */
174 typedef unsigned char MSG_CLASS_TYPE_T;
175
176
177 /**
178  *      @brief  Represents a message class. \n
179  *      The values for this type SHOULD be in _MSG_MMS_TRANSACTION_TYPE_E.
180  */
181 typedef unsigned char MSG_MMS_TRANSACTION_TYPE_T;
182
183
184 /*==================================================================================================
185                                          STRUCTURES
186 ==================================================================================================*/
187
188 /**
189  *      @brief  Represents a message type.
190  */
191 typedef struct
192 {
193         MSG_MAIN_TYPE_T         mainType;       /**< Message main type. See enum _MSG_MAIN_TYPE_E */
194         MSG_SUB_TYPE_T          subType;        /**< Message sub type. See enum _MSG_SUB_TYPE_E */
195         MSG_CLASS_TYPE_T        classType;      /**< Message class type. See enum _MSG_CLASS_TYPE_E */
196 } MSG_MESSAGE_TYPE_S;
197
198
199 /**
200  *      @brief  Represents a message in the framework.
201  */
202 typedef struct
203 {
204         msg_message_id_t                        msgId;                                                                                                                          /**< Indicates the message ID of this message. */
205         msg_thread_id_t                         threadId;                                                                                                                       /**< Indicates the thread ID. */
206         msg_folder_id_t                         folderId;                                                                                                                       /**< Indicates the folder ID. */
207         MSG_MESSAGE_TYPE_S              msgType;                                                                                                                        /**< Indicates the message type such as SMS and MMS */
208         msg_storage_id_t                        storageId;                                                                                                                      /**< Indicates where the message is saved. */
209         int                                                                             nAddressCnt;                                                                                                    /**< Indicates the count of addresses. */
210         MSG_ADDRESS_INFO_S              addressList[MAX_TO_ADDRESS_CNT];                                /**< Indicates the address information list. */
211         char                                                                            replyAddress[MAX_PHONE_NUMBER_LEN+1];   /**< Indicates the reply address. */
212         char                                                                            subject[MAX_SUBJECT_LEN+1];                                             /**< Indicates the message subject. */
213         time_t                                                                  displayTime;                                                                                                    /**< Indicates the display time related to the specific operation. */
214         msg_network_status_t    networkStatus;                                                                                                  /**< Indicates the network status of the message. */
215         msg_encode_type_t               encodeType;                                                                                                     /**< Indicates the string encoding type. */
216         bool                                                                            bRead;                                                                                                                          /**< Indicates whether the message is read or not. */
217         bool                                                                            bProtected;                                                                                                             /**< Indicates whether the message is protected or not. */
218         bool                                                                            bBackup;                                                                                                                        /**< Indicates whether the message was restored from PC. */
219         msg_priority_type_t             priority;                                                                                                                       /**< Indicates the priority of the message. */
220         msg_direction_type_t    direction;                                                                                                                      /**< Indicates whether the message is MO or MT (affecting address). */
221         MSG_PORT_INFO_S                         msgPort;                                                                                                                        /**< Indicates the port number information. */
222         bool                                                                            bTextSms;                                                                                                               /**< Indicates whether the message is just a text message or not. */
223         size_t                                                                  dataSize;                                                                                                                       /**< Indicates the data size. The unit is byte. */
224         char                                                                            msgData[MAX_MSG_DATA_LEN+1];                                    /**< Indicates the message payload information as a body. */
225         char                                                                            msgText[MAX_MSG_TEXT_LEN+1];
226         char                                                                            thumbPath[MSG_FILEPATH_LEN_MAX];
227 } MSG_MESSAGE_INFO_S;
228
229 typedef struct
230 {
231         msg_message_id_t                msgId;                                                                  /**< Indicates the message ID of this message. */
232         msg_thread_id_t                 threadId;                                                               /**< Indicates the thread ID. */
233         msg_folder_id_t                 folderId;                                                               /**< Indicates the folder ID. see enum _MSG_FOLDER_TYPE_E */
234         MSG_MAIN_TYPE_T                 mainType;                                                               /**< Message main type. See enum _MSG_MAIN_TYPE_E */
235         MSG_SUB_TYPE_T                  subType;                                                                /**< Message sub type. See enum _MSG_SUB_TYPE_E */
236         MSG_CLASS_TYPE_T                classType;                                                              /**< Message class type. See enum _MSG_CLASS_TYPE_E */
237         msg_storage_id_t                storageId;                                                              /**< Indicates where the message is saved. see enum _MSG_FOLDER_TYPE_E*/
238         msg_struct_list_s               *addr_list;
239         char                                    replyAddress[MAX_PHONE_NUMBER_LEN+1];   /**< Indicates the reply address. */
240         char                                    subject[MAX_SUBJECT_LEN+1];                             /**< Indicates the message subject. */
241         time_t                                  displayTime;                                                    /**< Indicates the display time related to the specific operation. */
242         msg_network_status_t    networkStatus;                                                  /**< Indicates the network status of the message. */
243         msg_encode_type_t               encodeType;                                                             /**< Indicates the string encoding type. */
244         bool                                    bRead;                                                                  /**< Indicates whether the message is read or not. */
245         bool                                    bProtected;                                                             /**< Indicates whether the message is protected or not. */
246         bool                                    bBackup;                                                                /**< Indicates whether the message was restored from PC. */
247         msg_priority_type_t             priority;                                                               /**< Indicates the priority of the message. */
248         msg_direction_type_t    direction;                                                              /**< Indicates whether the message is MO or MT, affecting address. */
249         bool                                    bPortValid;                                                                     /**< Indicates whether port information is used or not. */
250         unsigned short                  dstPort;                                                                /**< Recipient port number, not greater than 16 bit */
251         unsigned short                  srcPort;                                                                /**< Sender port number, not greater than 16 bit */
252         int                                             attachCount;                                                    /**< Indicates the count of attached files in mms. */
253         char                                    thumbPath[MSG_FILEPATH_LEN_MAX];
254         size_t                                  dataSize;                                                               /**< Indicates the data size. The unit is byte. */
255         void                                    *pData;                                                                 /**< Indicates the message payload information as a body. default character encoding is UTF-8*/
256         void                                    *pMmsData;                                                              /**< Indicates the message payload information as a body. default character encoding is UTF-8*/
257 } MSG_MESSAGE_HIDDEN_S;
258
259 /**
260  *      @brief  Represents message information for thread view.
261  */
262 typedef struct
263 {
264         msg_thread_id_t                 threadId;                                                                                                                       /**< Indicates the thread ID of this peer. */
265         char                                    threadName[MAX_THREAD_NAME_LEN+1];              /**< Indicates the name of this peer. > */
266         MSG_MAIN_TYPE_T                 mainType;                                                               /**< Indicates the latest msg main type. */
267         MSG_SUB_TYPE_T                  subType;                                                                /**< Indicates the latest msg sub type. */
268         char                                    threadData[MAX_THREAD_DATA_LEN+1];              /**< Indicates the latest msg data. */
269         time_t                                  threadTime;                                                                                                             /**< Indicates the latest msg time. */
270         msg_direction_type_t    direction;                                                                                                                      /**< Indicates whether the message is MO or MT (affecting address). */
271         int                                             unreadCnt;                                                                                                              /**< Indicates the unread messages from the Peer. */
272         int                                             smsCnt;                                                                                                                 /**< Indicates the SMS messages from the Peer. */
273         int                                             mmsCnt;                                                                                                                 /**< Indicates the MMS messages from the Peer. */
274 } MSG_THREAD_VIEW_S;
275
276
277 /**
278  *      @brief  Represents sim message informatioin list.
279  */
280 typedef struct
281 {
282         int nIdxCnt;            /**< The count of sim index */
283         int nMsgCnt;            /**< The count of sim message */
284         MSG_MESSAGE_INFO_S              *simMsgInfo;            /**< The pointer to sim message informatioin */
285 } MSG_SIM_MSG_INFO_LIST_S;
286
287
288 /**
289  *      @brief  Represents a request in the framework. \n
290  *      Applications compose a request and send it to the framework via Message handle. \n
291  *      This request ID is used to manage the request by the framework.
292  */
293 typedef struct
294 {
295         msg_request_id_t                reqId;          /**< Indicates the request ID, which is unique.
296                                                                                 When applications submit a request to the framework, this value will be set by the framework. */
297         MSG_MESSAGE_INFO_S              msgInfo;        /**< Indicates the message structure to be sent by applications. */
298         MSG_SENDINGOPT_INFO_S   sendOptInfo;
299 } MSG_REQUEST_INFO_S;
300
301
302 /**
303  *      @brief  Represents proxy information. \n
304  *      This stucture contains the information about the status cnf of a sent message.
305  */
306 typedef struct
307 {
308         int                                             listenerFd;             /**< Rx fd for status cnf */
309         unsigned int                    handleAddr;             /**< Handle address for status cnf */
310         msg_message_id_t                sentMsgId;              /**< The ID of a sent message for updating message status */
311 } MSG_PROXY_INFO_S;
312
313
314 /**
315  *      @brief  Aux data structure for MSG_CMD_REG_INCOMING_MSG_CB. \n
316  *      This stucture contains the information about the receiver for msgType and port.
317  */
318 typedef struct
319 {
320         int                             listenerFd;
321         MSG_MAIN_TYPE_T         msgType;
322         unsigned short          port;
323 } MSG_CMD_REG_INCOMING_MSG_CB_S;
324
325
326 /**
327  *      @brief  Aux data structure for MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB. \n
328  *      This stucture contains the information about the receiver for msgType and port.
329  */
330 typedef struct
331 {
332         int                             listenerFd;
333         MSG_MAIN_TYPE_T         msgType;
334         char appId[MAX_MMS_JAVA_APPID_LEN+1];
335 } MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB_S;
336
337
338 /**
339  *      @brief  Aux data structure for MSG_CMD_REG_INCOMING_SYNCML_MSG_CB. \n
340  *      This stucture contains the information about the receiver for msgType and port.
341  */
342 typedef struct
343 {
344         int                             listenerFd;
345         MSG_MAIN_TYPE_T         msgType;
346 } MSG_CMD_REG_INCOMING_SYNCML_MSG_CB_S;
347
348
349 /**
350  *      @brief  Aux data structure for MSG_CMD_REG_INCOMING_LBS_MSG_CB_S. \n
351  *      This stucture contains the information about the receiver for msgType and port.
352  */
353 typedef struct
354 {
355         int                             listenerFd;
356         MSG_MAIN_TYPE_T         msgType;
357 } MSG_CMD_REG_INCOMING_LBS_MSG_CB_S;
358
359
360 /**
361  *      @brief  Aux data structure for MSG_CMD_REG_INCOMING_JAVAMMS_TRID_S. \n
362  *      This stucture contains the information about the sent Java MMS messge transactionId.
363  */
364 typedef struct
365 {
366         bool                    posted;
367         char                    id[MMS_TR_ID_LEN+1];
368         char                            pduFileName[MAX_COMMON_INFO_SIZE+1];
369 } MSG_CMD_REG_INCOMING_JAVAMMS_TRID_S;
370
371
372 /**
373  *      @brief  Aux data structure for MSG_CMD_REG_SYNCML_MSG_OPERATION_CB. \n
374  *      This stucture contains the information about the receiver for msgType and port.
375  */
376 typedef struct
377 {
378         int                             listenerFd;
379         MSG_MAIN_TYPE_T         msgType;
380 } MSG_CMD_REG_SYNCML_MSG_OPERATION_CB_S;
381
382
383 typedef struct
384 {
385         int                                             alarm_id;
386         MSG_REQUEST_INFO_S              reqInfo;
387 }MSG_SCHEDULED_MSG_S;
388
389
390 /*==================================================================================================
391                                          ENUMS
392 ==================================================================================================*/
393
394 /**
395  *      @brief  Represents the values of a message main type. \n
396  *      Three main types of a message are predefined : SMS, MMS, and Email. More main types of a message can be defined here. \n
397  *      This enum is used as the value of MSG_MAIN_TYPE_T.
398  */
399 enum _MSG_MAIN_TYPE_E
400 {
401         MSG_UNKNOWN_TYPE = 0,           /**< Unknown main type */
402         MSG_SMS_TYPE,                           /**< SMS */
403         MSG_MMS_TYPE,                           /**< MMS */
404 };
405
406
407 /**
408  *      @brief  Represents the values of a message sub type. \n
409  *      Three sub types of a message are predefined : NORMAL, WAPPUSH, and CB. More sub types of a message can be defined here. \n
410  *      This enum is used as the value of MSG_SUB_TYPE_T.
411  */
412 enum _MSG_SUB_TYPE_E
413 {
414         /* SMS Specific Message Type */
415         MSG_NORMAL_SMS = 0,                     /**< Text SMS message */
416         MSG_CB_SMS,                                     /**< Cell Broadcasting  message */
417         MSG_JAVACB_SMS,                         /**< JAVA Cell Broadcasting  message */
418         MSG_TYPE0_SMS,                                  /**< Short Message Type 0 */
419         MSG_REPLACE_TYPE1_SMS,          /**< Replace Short Message Type 1 */
420         MSG_REPLACE_TYPE2_SMS,          /**< Replace Short Message Type 2 */
421         MSG_REPLACE_TYPE3_SMS,          /**< Replace Short Message Type 3 */
422         MSG_REPLACE_TYPE4_SMS,          /**< Replace Short Message Type 4 */
423         MSG_REPLACE_TYPE5_SMS,          /**< Replace Short Message Type 5 */
424         MSG_REPLACE_TYPE6_SMS,          /**< Replace Short Message Type 6 */
425         MSG_REPLACE_TYPE7_SMS,          /**< Replace Short Message Type 7 */
426         MSG_WAP_SI_SMS,                         /**< WAP Push Message SI */
427         MSG_WAP_SL_SMS,                         /**< WAP Push Message SL */
428         MSG_WAP_CO_SMS,                         /**< WAP Push Message CO */
429         MSG_MWI_VOICE_SMS,                      /**< MWI Message Voice */
430         MSG_MWI_FAX_SMS,                                /**< MWI Message Fax */
431         MSG_MWI_EMAIL_SMS,                      /**< MWI Message Email */
432         MSG_MWI_OTHER_SMS,                      /**< MWI Message Other */
433         MSG_STATUS_REPORT_SMS,          /**< SMS-STATUS-REPORT */
434         MSG_SYNCML_CP,                          /**< SyncML Message CP */
435         MSG_LBS_SMS,                                    /**< LBS Message */
436         MSG_REJECT_SMS,                         /**< Reject Message */
437         MSG_CONCAT_SIM_SMS,                     /**< Concatenated Message in SIM */
438
439         /* MMS Specific Message Type */
440         MSG_SENDREQ_MMS = 24,                                   /**< MMS Send Request message */
441         MSG_SENDCONF_MMS,                               /**< MMS Send Confirm message */
442         MSG_NOTIFICATIONIND_MMS,                        /**< MMS Notification Indication message */
443         MSG_GET_MMS,                                            /**< MMS GET MMS message */
444         MSG_NOTIFYRESPIND_MMS,                  /**< MMS Notify Response Indication message */
445         MSG_RETRIEVE_MMS,                                       /**< MMS Retrive MMS message */
446         MSG_RETRIEVE_AUTOCONF_MMS,              /**< MMS Retrieve Confirm message by auto retrieving*/
447         MSG_RETRIEVE_MANUALCONF_MMS,    /**< MMS Retrieve Confirm message by manual retrieving*/
448         MSG_ACKNOWLEGEIND_MMS,                  /**< MMS Acknowledge Indication message */
449         MSG_DELIVERYIND_MMS,                            /**< MMS Delivery Indication message */
450         MSG_READRECIND_MMS,                             /**< MMS Read Receive Indication message */
451         MSG_READORGIND_MMS,                             /**< MMS Read Origin Indication message */
452         MSG_FORWARD_MMS,                                        /**< MMS Forward message */
453         MSG_FORWARDREQ_MMS,                             /**< MMS Forward Request message */
454         MSG_FORWARDCONF_MMS,                    /**< MMS Forward Confirm message */
455         MSG_READREPLY_MMS,                              /**< MMS Read Reply message */
456         MSG_SENDREQ_JAVA_MMS,                   /**< MMS Send Request message for JAVA MMS */
457 };
458
459 /**
460  *      @brief  Represents the values of a message transaction type. \n
461  *      This enum is used as the value of MSG_MMS_TRANSACTION_TYPE_T.
462  */
463 enum _MSG_MMS_TRANSACTION_TYPE_E
464 {
465         MSG_MMS_SEND_COMPLETE = 0,
466         MSG_MMS_RETRIEVE_COMPLETE,
467         MSG_MMS_UNKNOWN,
468 };
469
470 #endif
471