update tizen source
[framework/messaging/msg-service.git] / include / common / MsgTypes.h
1 /*
2 *
3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
4 *
5 * This file is part of msg-service.
6 *
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 *          Sangkoo Kim <sangkoo.kim@samsung.com>
9 *          Seunghwan Lee <sh.cat.lee@samsung.com>
10 *          SoonMin Jung <sm0415.jung@samsung.com>
11 *          Jae-Young Lee <jy4710.lee@samsung.com>
12 *          KeeBum Kim <keebum.kim@samsung.com>
13 *
14 * PROPRIETARY/CONFIDENTIAL
15 *
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
21 *
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
28 *
29 */
30
31 #ifndef MSG_TYPES_H
32 #define MSG_TYPES_H
33
34 /**
35  *      @file           MsgTypes.h
36  *      @brief          Defines common types of messaging framework
37  *      @version        1.0
38  */
39
40 /**
41  *      @section                Introduction
42  *      - Introduction : Overview on Message Common Types
43  *      @section                Program
44  *      - Program : Message Common Types Reference
45  */
46
47 /*==================================================================================================
48                                          INCLUDE FILES
49 ==================================================================================================*/
50 #include <stdlib.h>
51 #include <stdio.h>
52 #include <time.h>
53 #include <stdbool.h>
54
55 /**
56  *      @ingroup                MESSAGING_FRAMEWORK
57  *      @defgroup       MESSAGING_COMMON_TYPES  Messaging Common Types
58  *      @{
59  */
60
61 /*==================================================================================================
62                                     DEFINES
63 ==================================================================================================*/
64 #define MAX_TO_ADDRESS_CNT              10
65 #define MAX_PHONE_NUMBER_LEN    20
66 #define MAX_ADDRESS_VAL_LEN     254
67 #define MAX_SIGN_VAL_LEN                128
68 #define MAX_SUBJECT_LEN                 120
69 #define MAX_DISPLAY_NAME_LEN    195
70 #define MAX_IMAGE_PATH_LEN              1024
71 #define MAX_MSG_DATA_LEN                320
72 #define MAX_MSG_TEXT_LEN                1530
73 #define MAX_FILTER_VALUE_LEN    40
74 #define MAX_COMMAND_LEN         1024
75
76 #define MAX_WAPPUSH_ID_LEN                      40
77 #define MAX_WAPPUSH_HREF_LEN            300
78 #define MAX_WAPPUSH_CONTENTS_LEN        2048
79
80 #define MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX     5
81 #define MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX    5
82 #define MAX_PUSH_CACHEOP_MAX_URL_LEN                    200
83
84 #define MAX_COMMON_INFO_SIZE    20
85
86 /**
87  *      @brief  Defines the maximum file path length
88  */
89 #define MSG_FILEPATH_LEN_MAX    1024
90
91 #define DEPRECATED __attribute__((deprecated))
92
93 #ifndef EXPORT_API
94 #define EXPORT_API __attribute__ ((visibility("default")))
95 #endif
96
97 /*==================================================================================================
98                                          TYPES
99 ==================================================================================================*/
100
101 /**
102  *      @brief  Defines Message handle.
103  */
104 typedef struct MessagingHandle *MSG_HANDLE_T;
105
106 typedef struct opq_message_s *msg_message_t;
107
108 typedef struct opq_threadview_s *msg_thread_view_t;
109
110 /**
111  *      @brief  Represents a messsage ID.
112  */
113 typedef unsigned int MSG_MESSAGE_ID_T;
114
115
116 /**
117  *      @brief  Represents a reference ID.
118  */
119 typedef unsigned int MSG_REFERENCE_ID_T;
120
121
122 /**
123  *      @brief  Represents a storage type.
124         See enum _MSG_STORAGE_ID_E
125  */
126 typedef unsigned char MSG_STORAGE_ID_T;
127
128
129 /**
130  *      @brief  Represents a folder ID.
131         See enum _MSG_FOLDER_ID_E
132  */
133 typedef char MSG_FOLDER_ID_T;
134
135
136 /**
137  *      @brief  Represents a request ID, which is unique for each request.
138  */
139 typedef unsigned int MSG_REQUEST_ID_T;
140
141
142 /**
143  *      @brief  Represents a message priority. \n
144  *      The values for this type SHOULD be in _MSG_PRIORITY_TYPE_E.
145  */
146 typedef unsigned char MSG_PRIORITY_TYPE_T;
147
148
149 /**
150  *      @brief  Represents the network status of a message. \n
151  *      The values for this type SHOULD be in _MSG_NETWORK_STATUS_E.
152  */
153 typedef unsigned char MSG_NETWORK_STATUS_T;
154
155
156 /**
157  *      @brief  Represents an address type. \n
158  *      The values for this type SHOULD be in _MSG_ADDRESS_TYPE_E.
159  */
160 typedef unsigned char MSG_ADDRESS_TYPE_T;
161
162
163 /**
164  *      @brief  Represents an recipient type. \n
165  *      The values for this type SHOULD be in _MSG_RECIPIENT_TYPE_E.
166  */
167 typedef unsigned char MSG_RECIPIENT_TYPE_T;
168
169
170 /**
171  *      @brief  Represents the type of a message direction. \n
172  *      The values for this type SHOULD be in _MSG_DIRECTION_TYPE_E.
173  */
174 typedef unsigned char MSG_DIRECTION_TYPE_T;
175
176
177 /**
178  *      @brief  Represents an encoding type. \n
179  *      The values for this type SHOULD be in _MSG_ENCODE_TYPE_E.
180  */
181 typedef unsigned char MSG_ENCODE_TYPE_T;
182
183
184 /**
185  *      @brief  Represents an error code. \n
186  *      The values for this type SHOULD be in _MSG_ERROR_E
187  */
188 typedef int MSG_ERROR_T;
189
190
191 /**
192 \brief Represents WAP Push App Code.
193 */
194 typedef unsigned char MSG_PUSH_ACTION_T;
195
196
197 /**
198 \brief Represents SyncML Message Type.
199 */
200 typedef unsigned short MSG_SYNCML_MESSAGE_TYPE_T;
201
202
203 /**
204  *      @brief  Represents a Contact ID.
205  */
206 typedef unsigned int MSG_CONTACT_ID_T;
207
208
209 /**
210   *  @brief     Represents a Delivery Report Status.
211  *      The values for this type SHOULD be in _MSG_DELIVERY_REPORT_STATUS_E
212   */
213 typedef int MSG_DELIVERY_REPORT_STATUS_T;
214
215
216 /**
217  *      @brief  Represents a Read Report Status.
218  *      The values for this type SHOULD be in _MSG_READ_REPORT_STATUS_E
219  */
220 typedef int MSG_READ_REPORT_STATUS_T;
221
222
223 /**
224  *      @brief  Represents a Message Type.
225  *      The values for this type SHOULD be in _MSG_MESSAGE_TYPE_E
226 */
227 typedef unsigned short MSG_MESSAGE_TYPE_T;
228
229
230 /**
231  *      @brief  Represents a thread ID. \n
232  */
233 typedef unsigned int MSG_THREAD_ID_T;
234
235
236 /*==================================================================================================
237                                          STRUCTURES
238 ==================================================================================================*/
239
240 /**
241  *      @brief  Represents address information.
242  */
243 typedef struct
244 {
245         MSG_THREAD_ID_T         threadId;                                                               /**< the thread ID of address */
246         MSG_ADDRESS_TYPE_T              addressType;                                                    /**< The type of an address in case of an Email or a mobile phone */
247         MSG_RECIPIENT_TYPE_T    recipientType;                                                  /**< The type of recipient address in case of To, Cc, and Bcc */
248         MSG_CONTACT_ID_T                contactId;                                                      /**< The contact ID of address */
249         char                                            addressVal[MAX_ADDRESS_VAL_LEN+1];      /**< The actual value of an address */
250         char                                            displayName[MAX_DISPLAY_NAME_LEN+1];    /**< The display name of an address */
251 } MSG_ADDRESS_INFO_S;
252
253
254 /**
255  *      @brief  Represents port number information.
256  */
257 typedef struct
258 {
259         bool                            valid;          /**< Indicates whether port information is used or not. */
260         unsigned short          dstPort;                /**< Recipient port number, not greater than 16 bit */
261         unsigned short          srcPort;                /**< Sender port number, not greater than 16 bit */
262 } MSG_PORT_INFO_S;
263
264
265 /**
266  *      @brief  Represents MMS Sending Option Structure in application.
267  */
268 typedef struct
269 {
270         bool                                    bReadReq;
271         time_t                          expiryTime;
272         bool                                    bUseDeliveryCustomTime;
273         time_t                          deliveryTime;
274         MSG_PRIORITY_TYPE_T     priority;
275 } MMS_SENDINGOPT_S;
276
277
278 /**
279  *      @brief  Represents SMS Sending Option Structure in application.
280  */
281 typedef struct
282 {
283         bool bReplyPath;
284 } SMS_SENDINGOPT_S;
285
286
287 /**
288  *      @brief  Represents MSG Sending Option Structure in application.
289  */
290 typedef struct
291 {
292         bool bSetting;
293         bool bDeliverReq;
294         bool bKeepCopy;
295
296         union
297         {
298                 MMS_SENDINGOPT_S        mmsSendOpt;
299                 SMS_SENDINGOPT_S        smsSendOpt;
300         } option;
301 } MSG_SENDINGOPT_S;
302
303
304 typedef enum
305 {
306         MMS_TIMETYPE_NONE               = -1,   // fixme: backward compatibility
307         MMS_TIMETYPE_ERROR              = -1,   // error return in Get method
308         MMS_TIMETYPE_RELATIVE   = 0,    // default
309         MMS_TIMETYPE_ABSOLUTE   = 1
310 }MmsTimeType;
311
312
313 typedef struct
314 {
315         MmsTimeType     type;
316         unsigned int    time;
317 }MmsTimeStruct;
318
319
320 /**
321  *      @brief  Represents MMS Sending Option Structure in framework.
322  */
323 typedef struct
324 {
325         bool                                    bReadReq;
326         bool                                    bUseDeliveryCustomTime;
327         MSG_PRIORITY_TYPE_T     priority;
328         MmsTimeStruct                   expiryTime;
329         MmsTimeStruct                   deliveryTime;
330 } MMS_SENDINGOPT_INFO_S;
331
332
333 /**
334  *      @brief  Represents SMS Sending Option Structure in framework.
335  */
336 typedef struct
337 {
338         bool    bReplyPath;
339 } SMS_SENDINGOPT_INFO_S;
340
341
342 /**
343  *      @brief  Represents MSG Sending Option Structure in framework.
344  */
345 typedef struct
346 {
347         bool bSetting;
348         bool bDeliverReq;
349         bool bKeepCopy;
350
351         union
352         {
353                 MMS_SENDINGOPT_INFO_S   mmsSendOptInfo;
354                 SMS_SENDINGOPT_INFO_S   smsSendOptInfo;
355         } option;
356 } MSG_SENDINGOPT_INFO_S;
357
358
359 /**
360  *      @brief  Represents a request in the application. \n
361  *      Applications compose a request and send it to the framework via Message handle. \n
362  *      This request ID is used to manage the request by the framework.
363  */
364 typedef struct
365 {
366         MSG_REQUEST_ID_T        reqId;  /**< Indicates the request ID, which is unique.
367                                                                         When applications submit a request to the framework, this value will be set by the framework. */
368         msg_message_t           msg;    /**< Indicates the message structure to be sent by applications. */
369         MSG_SENDINGOPT_S        sendOpt;
370 } MSG_REQUEST_S;
371
372
373 /**
374  *      @brief  Represents Address information list.
375  */
376 typedef struct
377 {
378         MSG_CONTACT_ID_T                contactId;                      /**< The contact id of message common informatioin */
379         MSG_ADDRESS_INFO_S              msgAddrInfo;            /**< The pointer to message common informatioin */
380 } MSG_THREAD_LIST_INDEX_S;
381
382
383 /**
384  *      @brief  Represents Peer Count Info.
385  */
386 typedef struct
387 {
388         int totalCount;                 /**< Indicates the total number of messages from the Peer. */
389         int unReadCount;                /**< Indicates the unread messages from the Peer. */
390         int smsMsgCount;                /**< Indicates the SMS messages from the Peer. */
391         int mmsMsgCount;                /**< Indicates the MMS messages from the Peer. */
392 }MSG_THREAD_COUNT_INFO_S;
393
394
395 /**
396  *      @brief  Represents the request information of Push Message (SI, SL).
397  */
398 typedef struct
399 {
400         MSG_PUSH_ACTION_T       action;
401         unsigned long                   received;
402         unsigned long                   created;
403         unsigned long                   expires;
404         char                                    id[MAX_WAPPUSH_ID_LEN];
405         char                                    href[MAX_WAPPUSH_HREF_LEN];
406         char                                    contents[MAX_WAPPUSH_CONTENTS_LEN];
407 } MSG_PUSH_MESSAGE_S;
408
409
410 /**
411  *      @brief  Represents the request information of Push Message (CO).
412  */
413 typedef struct
414 {
415         int             invalObjectCnt;
416         int             invalServiceCnt;
417         char            invalObjectUrl[MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN];
418         char            invalServiceUrl[MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN];
419 } MSG_PUSH_CACHEOP_S;
420
421
422 /**
423  *      @brief  Represents the SyncML Message Information.
424  */
425 typedef struct
426 {
427         int                                     extId;
428         int                                     pinCode;
429         msg_message_t           msg;
430 }MSG_SYNCML_MESSAGE_S;
431
432
433 /**
434  *      @brief  Represents the SyncML Message Data.
435  */
436  typedef struct
437 {
438         MSG_SYNCML_MESSAGE_TYPE_T       syncmlType;
439         int                                                     pushBodyLen;
440         char                                                    pushBody[MAX_WAPPUSH_CONTENTS_LEN];
441         int                                                             wspHeaderLen;
442         char                                                    wspHeader[MAX_WAPPUSH_CONTENTS_LEN];
443 }MSG_SYNCML_MESSAGE_DATA_S;
444
445
446 /**
447  *      @brief  Represents the SyncML Message Data.
448  */
449  typedef struct
450 {
451         char                                                    pushHeader[MAX_WAPPUSH_CONTENTS_LEN];
452         int                                                     pushBodyLen;
453         char                                                    pushBody[MAX_WAPPUSH_CONTENTS_LEN];
454 }MSG_LBS_MESSAGE_DATA_S;
455
456
457
458 /**
459  *      @brief  Represents the Report Status Data.
460  */
461  typedef struct
462 {
463         MSG_DELIVERY_REPORT_STATUS_T    deliveryStatus;         /**< Indicates the message ID of this message. */
464         time_t                                                  deliveryStatusTime;     /**< Indicates the display time related to the specific operation. */   //MAX_DISPLAY_TIME_LEN
465         MSG_READ_REPORT_STATUS_T                readStatus;                     /**< Indicates the message ID of this message. */
466         time_t                                                  readStatusTime;         /**< Indicates the display time related to the specific operation. */   //MAX_DISPLAY_TIME_LEN
467 }MSG_REPORT_STATUS_INFO_S;
468
469
470 /*==================================================================================================
471                                          ENUMS
472 ==================================================================================================*/
473
474 /**
475  *      @brief  Represents the type of Message. More members maybe added if needed \n
476  *      This enum is used as the value of MSG_MESSAGE_TYPE_T.
477  */
478  enum _MSG_MESSAGE_TYPE_E
479 {
480         MSG_TYPE_INVALID = 0,                   /** < Invalid Type Message */
481
482         MSG_TYPE_SMS,                                   /** < Normal SMS Message */
483         MSG_TYPE_SMS_CB,                                /** < Cell Broadcasting SMS Message */
484         MSG_TYPE_SMS_JAVACB,                    /** < JAVA Cell Broadcasting SMS Message */
485         MSG_TYPE_SMS_WAPPUSH,           /** < WAP Push SMS Message */
486         MSG_TYPE_SMS_MWI,                               /** < MWI SMS Message */
487         MSG_TYPE_SMS_SYNCML,                    /** < SyncML CP SMS Message */
488         MSG_TYPE_SMS_REJECT,                    /** < Reject Message */
489
490         MSG_TYPE_MMS,                                   /** < Normal MMS Message */
491         MSG_TYPE_MMS_JAVA,                      /** < JAVA MMS Message */
492         MSG_TYPE_MMS_NOTI,                      /** < MMS Notification Message */
493 };
494
495
496 /**
497  *      @brief  Represents the values of an error code. \n
498  *      Success code is zero, but all error codes SHOULD be negative and smaller than MSG_ERROR_BEGIN. \n
499  *      This enum is used as the value of MSG_ERROR_T.
500  */
501 enum _MSG_ERROR_E
502 {
503         MSG_SUCCESS = 0,                                /**< Successful */
504
505         MSG_ERR_NULL_MSGHANDLE = -1,    /**< Message handle is NULL */
506         MSG_ERR_NULL_POINTER = -2,              /**< Pointer is NULL */
507         MSG_ERR_NULL_MESSAGE = -3,              /**< Message is NULL */
508         MSG_ERR_INVALID_STORAGE_ID = -4,        /**< Storage ID is invalid */
509         MSG_ERR_INVALID_MSG_TYPE = -5,          /**< Message type is invalid */
510
511         MSG_ERR_INVALID_STORAGE_REG= -6,        /**< Storage registry is invalid */
512         MSG_ERR_INVALID_MESSAGE_ID = -7,        /**< Message ID is invalid */
513         MSG_ERR_INVALID_MSGHANDLE = -8, /**< Message handle is invalid */
514         MSG_ERR_INVALID_PARAMETER = -9, /**< Parameter is invalid */
515         MSG_ERR_INVALID_MESSAGE = -10,                  /**< Message is invalid */
516
517         MSG_ERR_INVALID_PLUGIN_HANDLE = -11,    /**< Plugin handle is invalid */
518         MSG_ERR_MEMORY_ERROR = -12,                     /**< Memory is error */
519         MSG_ERR_COMMUNICATION_ERROR = -13,      /**< Communication between client and server is error */
520         MSG_ERR_SIM_STORAGE_FULL = -14,         /**< SIM Storage is full */
521         MSG_ERR_TRANSPORT_ERROR = -15,                  /**< Transport event error */
522
523         MSG_ERR_CALLBACK_ERROR = -16,                   /**< Callback event error */
524         MSG_ERR_STORAGE_ERROR = -17,                    /**< Storage event error */
525         MSG_ERR_FILTER_ERROR = -18,                             /**< Filter event error */
526         MSG_ERR_MMS_ERROR = -19,                                /**< MMS event error */
527         MSG_ERR_MMPLAYER_CREATE = -20,                  /**< Multimedia Error*/
528
529         MSG_ERR_MMPLAYER_SET_ATTRS = -21,               /**< Multimedia Error*/
530         MSG_ERR_MMPLAYER_REALIZE = -22,         /**< Multimedia Error*/
531         MSG_ERR_MMPLAYER_PLAY = -23,                    /**< Multimedia Error*/
532         MSG_ERR_MMPLAYER_STOP = -24,                    /**< Multimedia Error*/
533         MSG_ERR_MMPLAYER_DESTROY = -25,         /**< Multimedia Error*/
534
535         MSG_ERR_UNKNOWN = -26,                                  /**< Unknown errors */
536
537         /* Start Database Errors */
538         MSG_ERR_DB_CONNECT = -27,
539         MSG_ERR_DB_DISCONNECT = -28,
540         MSG_ERR_DB_EXEC = -29,
541         MSG_ERR_DB_GETTABLE = -30,
542
543         MSG_ERR_DB_PREPARE = -31,
544         MSG_ERR_DB_STEP = -32,
545         MSG_ERR_DB_NORECORD= -33,
546         MSG_ERR_DB_STORAGE_INIT = -34,
547         MSG_ERR_DB_MAKE_DIR = -35,
548
549         MSG_ERR_DB_ROW = -36,
550         MSG_ERR_DB_DONE = -37,
551         MSG_ERR_DB_GENERIC= -38,
552         MSG_ERR_DB_END = -39,
553         /* End Database Errors */
554
555         /* Start Setting Errors */
556         MSG_ERR_SET_SETTING = -40,
557         MSG_ERR_SET_SIM_SET = -41,
558         MSG_ERR_SET_READ_ERROR = -42,
559         MSG_ERR_SET_WRITE_ERROR = -43,
560         MSG_ERR_SET_DELETE_ERROR = -44,
561         /* End Setting Errors */
562
563         /* Start Plugin Errors */
564         MSG_ERR_PLUGIN_TAPIINIT = -45,
565         MSG_ERR_PLUGIN_REGEVENT = -46,
566         MSG_ERR_PLUGIN_TRANSPORT = -47,
567         MSG_ERR_PLUGIN_STORAGE = -48,
568         MSG_ERR_PLUGIN_SETTING = -49,
569
570         MSG_ERR_PLUGIN_WAPDECODE = -50,
571         MSG_ERR_PLUGIN_TAPI_FAILED = -51,
572         MSG_ERR_PLUGIN_SIM_MSG_FULL = -52,
573         /* End Plugin Errors */
574
575         MSG_ERR_MESSAGE_COUNT_FULL = -53,
576         MSG_ERR_READREPORT_NOT_REQUESTED = -54,
577         MSG_ERR_READREPORT_ALEADY_SENT = -55,
578
579         MSG_ERR_FILTER_DUPLICATED = -56,                                /**< Filter duplicate error */
580         MSG_ERR_SECURITY_ERROR = -57,
581         MSG_ERR_NO_SIM = -58,
582         MSG_ERR_SERVER_NOT_READY= -59,
583 };
584
585
586 /**
587  *      @brief  Represents the values of a message priority. \n
588  *      This enum is used as the value of MSG_PRIORITY_TYPE_T.
589  */
590 enum _MSG_PRIORITY_TYPE_E
591 {
592         MSG_MESSAGE_PRIORITY_LOW,               /**< Low priority */
593         MSG_MESSAGE_PRIORITY_NORMAL,    /**< Normal priority */
594         MSG_MESSAGE_PRIORITY_HIGH,              /**< High priority */
595 };
596
597
598 /**
599  *      @brief  Represents the values of a network status. \n
600  *      This enum is used as the value of MSG_NETWORK_STATUS_T.
601  */
602 enum _MSG_NETWORK_STATUS_E
603 {
604         MSG_NETWORK_NOT_SEND = 0,               /**< Message is not sending */
605         MSG_NETWORK_SENDING,                            /**< Message is sending */
606         MSG_NETWORK_SEND_SUCCESS,               /**< Message is sent successfully */
607         MSG_NETWORK_SEND_FAIL,                  /**< Message is failed to send */
608         MSG_NETWORK_DELIVER_SUCCESS,    /**< Message is delivered */
609         MSG_NETWORK_DELIVER_FAIL,               /**< Message is failed to deliver */
610         MSG_NETWORK_RECEIVED,                   /**< Message is received */
611         MSG_NETWORK_REQ_CANCELLED,              /**< Request is cancelled */
612         MSG_NETWORK_RETRIEVING,                         /**< Message is retrieving */
613         MSG_NETWORK_RETRIEVE_SUCCESS,           /**< Message is retrieved successfully */
614         MSG_NETWORK_RETRIEVE_FAIL,                      /**< Message is failed to retrieve */
615         MSG_NETWORK_SEND_TIMEOUT,                       /**< Message is failed to send by timeout */
616 };
617
618
619 /**
620  *      @brief  Represents the values of an address type. \n
621  *      This enum is used as the value of MSG_ADDRESS_TYPE_T.
622 */
623 enum _MSG_ADDRESS_TYPE_E
624 {
625         MSG_ADDRESS_TYPE_UNKNOWN = 0,   /**< The address type is unknown. */
626         MSG_ADDRESS_TYPE_PLMN,                  /**< The address type is for a phone number like +1012345678. */
627         MSG_ADDRESS_TYPE_EMAIL,                 /**< The address type is for an email address like abc@example.email. */
628 };
629
630
631 /**
632  *      @brief  Represents the values of a recipient type. \n
633  *      This enum is used as the value of MSG_RECIPIENT_TYPE_T.
634 */
635 enum _MSG_RECIPIENT_TYPE_E
636 {
637         MSG_RECIPIENTS_TYPE_UNKNOWN = 0,        /**< The recipient type is unknown. */
638         MSG_RECIPIENTS_TYPE_TO,                 /**< The recipient type is for "To". */
639         MSG_RECIPIENTS_TYPE_CC,                 /**< The recipient type is for "Cc". */
640         MSG_RECIPIENTS_TYPE_BCC,                        /**< The recipient type is for "Bcc". */
641 };
642
643
644 /**
645  *      @brief  Represents the values of a direction type. \n
646  *      This enum is used as the value of MSG_DIRECTION_TYPE_T.
647  */
648 enum _MSG_DIRECTION_TYPE_E
649 {
650         MSG_DIRECTION_TYPE_MO = 0,              /**< The direction type is for mobile originated */
651         MSG_DIRECTION_TYPE_MT,                  /**< The direction type is for mobile terminated */
652 };
653
654
655 /**
656  *      @brief  Represents the values of a string encoding type. \n
657  *      This enum is used as the value of MSG_ENCODE_TYPE_T.
658  */
659 enum _MSG_ENCODE_TYPE_E
660 {
661         MSG_ENCODE_GSM7BIT = 0, /**< The string encoding type is GSM7BIT */
662         MSG_ENCODE_8BIT,                /**< The string encoding type is 8 BIT */
663         MSG_ENCODE_UCS2,                /**< The string encoding type is UCS2 */
664         MSG_ENCODE_AUTO,                /**< The string encoding type is AUTO */
665 };
666
667
668 /**
669  *      @brief  Represents the action type of Push Message. \n
670  *      This enum is used as the value of MSG_PUSH_ACTION_T.
671  */
672 enum _MSG_PUSH_ACTION_E
673 {
674         // SI Action
675         MSG_PUSH_SI_ACTION_SIGNAL_NONE = 0x00,
676         MSG_PUSH_SI_ACTION_SIGNAL_LOW,
677         MSG_PUSH_SI_ACTION_SIGNAL_MEDIUM,
678         MSG_PUSH_SI_ACTION_SIGNAL_HIGH,
679         MSG_PUSH_SI_ACTION_DELETE,
680
681         // SL Action
682         MSG_PUSH_SL_ACTION_EXECUTE_LOW,
683         MSG_PUSH_SL_ACTION_EXECUTE_HIGH,
684         MSG_PUSH_SL_ACTION_CACHE,
685 };
686
687
688 /**
689  *      @brief  Represents the type of SyncML Message. \n
690  *      This enum is used as the value of MSG_SYNCML_MESSAGE_TYPE_T.
691  */
692  enum _MSG_SYNCML_MESSAGE_TYPE_E
693  {
694         DM_WBXML,                                       /** < DM WBXML SyncML Message */
695         DM_XML,                                         /** < DM XML SyncML Message */
696         DM_NOTIFICATION,                        /** < DM Notification SyncML Message */
697
698         DS_NOTIFICATION,                        /** < DS Notification SyncML Message */
699         DS_WBXML,                                       /** < DS WBXML SyncML Message */
700
701         CP_XML,                                         /** < CP XML SyncML Message */
702         CP_WBXML,                                       /** < CP WBXML SyncML Message */
703
704         OTHERS,                                         /** < Unknown SyncML Message */
705  };
706
707
708 /**
709  *      @brief  Represents the values of a Delivery Report Status. \n
710  *      This enum is used as the value of MSG_DELIVERY_REPORT_STATUS_T.
711 */
712  enum _MSG_DELIVERY_REPORT_STATUS_E
713  {
714          MSG_DELIVERY_REPORT_NONE                               =       -1,     /**< Indicates the status unavailable */
715          MSG_DELIVERY_REPORT_EXPIRED                    =       0,      /**< Indicates the expired status of message */
716          MSG_DELIVERY_REPORT_SUCCESS                            =       1,      /**< Indicates the success status of message */
717          MSG_DELIVERY_REPORT_REJECTED                   =       2,      /**< Indicates the rejected status of message */
718          MSG_DELIVERY_REPORT_DEFERRED                   =       3,      /**< Indicates the deferred status of message */
719          MSG_DELIVERY_REPORT_UNRECOGNISED               =       4,      /**< Indicates the unrecongnised status of message */
720          MSG_DELIVERY_REPORT_INDETERMINATE              =       5,      /**< Indicates the unrecongnised status of message */
721          MSG_DELIVERY_REPORT_FORWARDED                  =       6,      /**< Indicates the forwarded status of message */
722          MSG_DELIVERY_REPORT_UNREACHABLE                =       7,      /**< Indicates the unreachable status of message */
723          MSG_DELIVERY_REPORT_ERROR                              =       8,      /**< Indicates the error status of message */
724  };
725
726
727 /**
728  *      @brief  Represents the values of a Read Report Status. \n
729  *      This enum is used as the value of MSG_READ_REPORT_STATUS_T.
730 */
731 enum _MSG_READ_REPORT_STATUS_E
732  {
733          MSG_READ_REPORT_NONE                   =       -1,       /**< Indicates the status unavailable */
734          MSG_READ_REPORT_IS_READ                =       0,        /**< Indicates the message is read */
735          MSG_READ_REPORT_IS_DELETED     =       1         /**< Indicates the message is deleted */
736  };
737
738 /**
739  *      @}
740  */
741
742 #endif // MSG_TYPES_H
743