Modify flora license version.
[platform/core/messaging/msg-service.git] / include / common / MsgSettingTypes.h
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.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_SETTING_TYPES_H
18 #define MSG_SETTING_TYPES_H
19
20 /**
21  *      @file           MsgSettingTypes.h
22  *      @brief          Defines setting types of messaging framework
23  *      @version        1.0
24  */
25
26 /**
27  *      @section                Introduction
28  *      - Introduction : Overview on Messaging Setting Types
29  *      @section                Program
30  *      - Program : Messaging Setting Types Reference
31  */
32
33 /*==================================================================================================
34                                          INCLUDE FILES
35 ==================================================================================================*/
36 #include "MsgTypes.h"
37
38 /**
39  *      @ingroup                MESSAGING_FRAMEWORK
40  *      @defgroup       MESSAGING_SETTING_TYPES Messaging Setting Types
41  *      @{
42  */
43
44 /*==================================================================================================
45                                          TYPES
46 ==================================================================================================*/
47
48 /**
49  *      @brief  Represents an option type. \n
50  *      The values for this type SHOULD be in _MSG_OPTION_TYPE_E.
51  */
52 typedef unsigned int MSG_OPTION_TYPE_T;
53
54
55 /**
56  *      @brief  Represents an SMS network mode. \n
57  *      The values for this type SHOULD be in _MSG_SMS_NETWORK_MODE_E.
58  */
59 typedef unsigned char MSG_SMS_NETWORK_MODE_T;
60
61
62 /**
63  *      @brief  Represents the period of playing alert tone. \n
64  *      The values for this type SHOULD be in _MSG_ALERT_TONE_E.
65  */
66 typedef unsigned char MSG_ALERT_TONE_T;
67
68
69 /**
70  *      @brief  Represents the default storage to save SMS. \n
71  *      The values for this type SHOULD be in _MSG_SMS_SAVE_STORAGE_E.
72  */
73 typedef unsigned char MSG_SMS_SAVE_STORAGE_T;
74
75
76 /**
77  *      @brief  Represents the type of number for SMS center address. \n
78  *      The values for this type SHOULD be in _MSG_SMS_TON_E.
79  */
80 typedef unsigned char MSG_SMS_TON_T;
81
82
83 /**
84  *      @brief  Represents the numbering plan ID for SMS center address. \n
85  *      The values for this type SHOULD be in _MSG_SMS_NPI_E.
86  */
87 typedef unsigned char MSG_SMS_NPI_T;
88
89
90 /**
91  *      @brief  Represents the protocol ID for SMS center address. \n
92  *      The values for this type SHOULD be in _MSG_SMS_PID_E.
93  */
94 typedef unsigned char MSG_SMS_PID_T;
95
96
97 /**
98  *      @brief  Represents the validity period of SMS. \n
99  *      The values for this type SHOULD be in _MSG_VAL_PERIOD_E.
100  */
101 typedef unsigned char MSG_VAL_PERIOD_T;
102
103
104 /**
105  *      @brief  Represents the class type of MMS. \n
106  *      The values for this type SHOULD be in _MSG_MMS_MSG_CLASS_TYPE_E.
107  */
108 typedef unsigned char MSG_MMS_MSG_CLASS_TYPE_T;
109
110
111 /**
112  *      @brief  Represents the expiry time of MMS. \n
113  *      The values for this type SHOULD be in _MSG_MMS_EXPIRY_TIME_E.
114  */
115 typedef unsigned int MSG_MMS_EXPIRY_TIME_T;
116
117
118 /**
119  *      @brief  Represents the delivery time of MMS. \n
120  *      The values for this type SHOULD be in _MSG_MMS_DELIVERY_TIME_E.
121  */
122 typedef unsigned int MSG_MMS_DELIVERY_TIME_T;
123
124
125 /**
126  *      @brief  Represents the reply charging type of MMS. \n
127  *      The values for this type SHOULD be in _MSG_MMS_REPLY_CHARGING_TYPE_E.
128  */
129 typedef unsigned char MSG_MMS_REPLY_CHARGING_TYPE_T;
130
131
132 /**
133  *      @brief  Represents the creation mode of MMS. \n
134  *      The values for this type SHOULD be in _MSG_MMS_CREATION_MODE_E.
135  */
136 typedef unsigned char MSG_MMS_CREATION_MODE_T;
137
138 /**
139  *      @brief  Represents the retrieve type for MMS home network. \n
140  *      The values for this type SHOULD be in _MSG_MMS_HOME_RETRIEVE_TYPE_E.
141  */
142 typedef unsigned char MSG_MMS_HOME_RETRIEVE_TYPE_T;
143
144
145 /**
146  *      @brief  Represents the retrieve type for MMS abroad network. \n
147  *      The values for this type SHOULD be in _MSG_MMS_ABROAD_RETRIEVE_TYPE_E.
148  */
149 typedef unsigned char MSG_MMS_ABROAD_RETRIEVE_TYPE_T;
150
151
152 /**
153  *      @brief  Represents the frequency of sending MMS read report. \n
154  *      The values for this type SHOULD be in _MSG_MMS_SEND_READ_REPORT_E.
155  */
156 typedef unsigned char MSG_MMS_SEND_READ_REPORT_T;
157
158
159 /**
160  *      @brief  Represents whether a push message is received or not. \n
161  *      The values for this type SHOULD be in _MSG_PUSH_RECEIVE_TYPE_E.
162  */
163 typedef unsigned char MSG_PUSH_RECEIVE_TYPE_T;
164
165
166 /**
167  *      @brief  Represents the service type for a push message. \n
168  *      The values for this type SHOULD be in _MSG_PUSH_SERVICE_TYPE_E.
169  */
170 typedef unsigned char MSG_PUSH_SERVICE_TYPE_T;
171
172
173 /**
174  *      @brief  Represents the language type for a cell broadcasting message. \n
175  *      The values for this type SHOULD be in _MSG_CB_LANGUAGE_TYPE_E.
176  */
177 typedef unsigned char MSG_CB_LANGUAGE_TYPE_T;
178
179
180 /**
181  *      @brief  Represents the SIM status from telephony. \n
182  *      The values for this type SHOULD be in \ref _MSG_SIM_STATUS_E.
183  */
184 typedef unsigned char MSG_SIM_STATUS_T;
185
186
187 /*==================================================================================================
188                                          STRUCTURES
189 ==================================================================================================*/
190
191 /**
192  *      @brief  Represents SMSC address information.
193  */
194 typedef struct
195 {
196         MSG_SMS_TON_T                   ton;                                                            /**< Type of number */
197         MSG_SMS_NPI_T                   npi;                                                            /**< Numbering plan ID */
198         char                                            address[SMSC_ADDR_MAX+1];               /**< SMSC address */
199 } MSG_SMSC_ADDRESS_S;
200
201
202 /**
203  *      @brief  Represents SMSC data information.
204  */
205 typedef struct
206 {
207         MSG_SMS_PID_T                   pid;                                                    /**< Protocol idendifier */
208         MSG_VAL_PERIOD_T                valPeriod;                                      /**< Validity period value */
209         char                                            name[SMSC_NAME_MAX+1];          /**< SMSC name */
210         MSG_SMSC_ADDRESS_S              smscAddr;                                       /**< SMSC address structure */
211 } MSG_SMSC_DATA_S;
212
213 /**
214  *      @brief  Represents an SMSC list.
215  */
216 typedef struct
217 {
218         int                                             selected;                                                       /**< Selected SMSC index */
219         int                                             totalCnt;                                                       /**< The count of total SMSC addresses */
220         MSG_SMSC_DATA_S                 smscData[SMSC_LIST_MAX];                        /**< SMSC data information list*/
221 }MSG_SMSC_LIST_S;
222
223 /**
224  *      @brief  Represents an SMSC list.
225  */
226 typedef struct
227 {
228         int                                             selected;                               /**< Selected SMSC index */
229         msg_struct_list_s               *smsc_list;                             /**< SMSC data information list*/
230 }MSG_SMSC_LIST_HIDDEN_S;
231
232 /**
233  *      @brief  Represents the information of a cell broadcasting channel.
234  */
235 typedef struct
236 {
237         bool                    bActivate;                                                      /**< Indicates whether the CB channel is activate or passive. */
238         unsigned int    from;                                                           /**< Indicates the start ID of a CB channel range. */
239         unsigned int    to;                                                                     /**< Indicates the end ID of a CB channel range. */
240         char                    name[CB_CHANNEL_NAME_MAX+1];            /**< Indicates the name of a CB channel. */
241 } MSG_CB_CHANNEL_INFO_S;
242
243
244 /**
245  *      @brief  Represents cell broadcasting channel information.
246  */
247 typedef struct
248 {
249         int                                             channelCnt;                                     /**< The count of CB channels */
250         MSG_CB_CHANNEL_INFO_S   channelInfo[CB_CHANNEL_MAX];    /**< The structure of CB channel information */
251 } MSG_CB_CHANNEL_S;
252
253 /**
254  *      @brief  Represents an general option.
255  */
256 typedef struct
257 {
258         bool                                                    bKeepCopy;                      /**< Indicates whether the SMS message copy is kept or not. */
259         MSG_ALERT_TONE_T                        alertTone;                      /**< Indicates the period of playing alert tone. */
260         bool                                                    bAutoErase;                     /**< Indicates whether the auto-erase option is enabled or not. */
261 }MSG_GENERAL_OPT_S;
262
263
264 /**
265  *      @brief  Represents an SMS send option.
266  */
267 typedef struct
268 {
269         msg_encode_type_t                       dcs;                                    /**< Indicates the string encoding type. */
270         MSG_SMS_NETWORK_MODE_T  netMode;                                /**< Indicates the network mode (CS/PS) to send SMS. */
271         bool                                                    bReplyPath;                     /**< Indicates whether the SMS reply path is set or not. */
272         bool                                                    bDeliveryReport;                /**< Indicates whether the SMS delivery report will be sent or not. */
273         MSG_SMS_SAVE_STORAGE_T          saveStorage;                    /**< Indicates the default storage to save SMS. */
274 }MSG_SMS_SENDOPT_S;
275
276
277 /**
278  *      @brief  Represents an MMS send option.
279  */
280 typedef struct
281 {
282         MSG_MMS_MSG_CLASS_TYPE_T        msgClass;
283         msg_priority_type_t                     priority;                               /**< Indicates the priority of the message. */
284         MSG_MMS_EXPIRY_TIME_T           expiryTime;                     /**< Indicates the time when the message is to be removed from the MMSC. */
285         MSG_MMS_DELIVERY_TIME_T         deliveryTime;                   /**< Indicates the message transmission time which is set in the MMSC. */
286         unsigned int                                    customDeliveryTime;     /**< Indicates the message transmission time which is set in the MMSC. */
287         bool                                                    bSenderVisibility;              /**< Indicates whether the address is hidden or not. */
288         bool                                                    bDeliveryReport;                /**< Indicates whether the delivery report will be sent or not. */
289         bool                                                    bReadReply;                     /**< Indicates whether the read report will be sent or not. */
290         bool                                                    bKeepCopy;                      /**< Indicates whether the message copy is kept or not. */
291         bool                                                    bBodyReplying;          /**< Indicates whether the body is included when replying or not. */
292         bool                                                    bHideRecipients;                /**< Indicates whether the recipients are hidden or not. */
293
294         MSG_MMS_REPLY_CHARGING_TYPE_T   replyCharging;
295         unsigned int                                            replyChargingDeadline;
296         unsigned int /*long*/                           replyChargingSize;
297
298         MSG_MMS_CREATION_MODE_T creationMode;
299 } MSG_MMS_SENDOPT_S;
300
301
302 /**
303  *      @brief  Represents an MMS receive option.
304  */
305 typedef struct
306 {
307         MSG_MMS_HOME_RETRIEVE_TYPE_T            homeNetwork;    /**< Indicates the retrieve type for MMS home network. */
308         MSG_MMS_ABROAD_RETRIEVE_TYPE_T  abroadNetwok;   /**< Indicates the retrieve type for MMS abroad network. */
309 //      MSG_MMS_SEND_READ_REPORT_T              readReceipt;    /**< Indicates whether the read report will be sent or not. */
310         bool                            readReceipt;                                    /**< Indicates whether the read report will be sent or not. */
311         bool                            bDeliveryReceipt;                       /**< Indicates whether the delivery report will be sent or not. */
312         bool                            bRejectUnknown;                 /**< Indicates whether unknown addresses are rejected or not. */
313         bool                            bRejectAdvertisement;   /**< Indicates whether advertisement is rejected or not. */
314 } MSG_MMS_RECVOPT_S;
315
316
317 /**
318  *      @brief  Represents an MMS style option.
319  */
320 typedef struct
321 {
322         unsigned int    fontSize;
323         bool                    bFontStyleBold;
324         bool                    bFontStyleItalic;
325         bool                    bFontStyleUnderline;
326         unsigned int    fontColorRed;
327         unsigned int    fontColorGreen;
328         unsigned int    fontColorBlue;
329         unsigned int    fontColorHue;
330         unsigned int    bgColorRed;
331         unsigned int    bgColorGreen;
332         unsigned int    bgColorBlue;
333         unsigned int    bgColorHue;
334         unsigned int    pageDur;
335         unsigned int    pageCustomDur;
336         unsigned int    pageDurManual;
337 } MSG_MMS_STYLEOPT_S;
338
339
340 /**
341  *      @brief  Represents a push message option.
342  */
343 typedef struct
344 {
345         bool                                            bReceive;               /**< Indicates whether the push message is received or not. */
346         MSG_PUSH_SERVICE_TYPE_T serviceType;            /**< Indicates the service type of a push message. */
347 } MSG_PUSHMSG_OPT_S;
348
349
350 /**
351  *      @brief  Represents a cell broadcasting message option.
352  */
353 typedef struct
354 {
355         bool                            bReceive;               /**< Indicates whether the CB message is received or not. */
356         int                                     maxSimCnt;              /**< Indicates the number of channels which can be stored in SIM. */
357         MSG_CB_CHANNEL_S        channelData;            /**< Indicates the cell broadcasting channel information. */
358         bool                            bLanguage[CB_LANG_TYPE_MAX];            /**< Indicates whether the language name of a cell broadcasting message is set or not. */
359 } MSG_CBMSG_OPT_S;
360
361 typedef struct
362 {
363         bool                                    bReceive;               /**< Indicates whether the CB message is received or not. */
364         int                                     maxSimCnt;              /**< Indicates the number of channels which can be stored in SIM. */
365         msg_struct_list_s       *channelData;           /**< Indicates the cell broadcasting channel information. */
366         bool                                    bLanguage[CB_LANG_TYPE_MAX];            /**< Indicates whether the language name of a cell broadcasting message is set or not. */
367 } MSG_CBMSG_OPT_HIDDEN_S;
368
369 /**
370  *      @brief  Represents a voice mail number option.
371  */
372 typedef struct
373 {
374         char mailNumber[MAX_PHONE_NUMBER_LEN+1];
375 } MSG_VOICEMAIL_OPT_S;
376
377
378 /**
379  *      @brief  Represents a MMS size option.
380  */
381 typedef struct
382 {
383         int nMsgSize;
384 } MSG_MSGSIZE_OPT_S;
385
386
387 /**
388  *      @brief  Represents setting information.
389  */
390 typedef struct
391 {
392         MSG_OPTION_TYPE_T       type;           /**< The option type in a setting */
393
394         union
395         {
396                 MSG_GENERAL_OPT_S               generalOpt;             /**< General option */
397                 MSG_SMS_SENDOPT_S               smsSendOpt;             /**< SMS send option */
398                 MSG_SMSC_LIST_S                 smscList;                       /**< SMSC list option */
399                 MSG_MMS_SENDOPT_S               mmsSendOpt;             /**< MMS send option */
400                 MSG_MMS_RECVOPT_S               mmsRecvOpt;             /**< MMS receive option */
401                 MSG_MMS_STYLEOPT_S              mmsStyleOpt;            /**< MMS style option */
402                 MSG_PUSHMSG_OPT_S               pushMsgOpt;             /**< Push message option */
403                 MSG_CBMSG_OPT_S         cbMsgOpt;               /**< Cell broadcasting message option */
404                 MSG_VOICEMAIL_OPT_S             voiceMailOpt;           /**< voice mail option */
405                 MSG_MSGSIZE_OPT_S               msgSizeOpt;             /**< MMS size option */
406         } option;
407 }MSG_SETTING_S;
408
409
410 /**
411  *      @}
412  */
413
414 #endif // MSG_SETTING_TYPES_H
415