2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://www.tizenopensource.org/license
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.
17 #ifndef MSG_SETTING_TYPES_H
18 #define MSG_SETTING_TYPES_H
21 * @file MsgSettingTypes.h
22 * @brief Defines setting types of messaging framework
27 * @section Introduction
28 * - Introduction : Overview on Messaging Setting Types
30 * - Program : Messaging Setting Types Reference
33 /*==================================================================================================
35 ==================================================================================================*/
39 * @ingroup MESSAGING_FRAMEWORK
40 * @defgroup MESSAGING_SETTING_TYPES Messaging Setting Types
44 /*==================================================================================================
46 ==================================================================================================*/
47 #define SMSC_NAME_MAX 127 /* Max SMSC Name Length */
48 #define SMSC_ADDR_MAX 20 /* Max SMSC Adress Length */
49 #define SMSC_LIST_MAX 5 /* Max List Count of SMSC */
50 #define CB_CHANNEL_NAME_MAX 32 /* cb channel name max size */
51 #define CB_CHANNEL_MAX 30 /* cb channel max count */
52 #define CB_LANG_TYPE_MAX 10
54 /*==================================================================================================
56 ==================================================================================================*/
59 * @brief Represents an option type. \n
60 * The values for this type SHOULD be in _MSG_OPTION_TYPE_E.
62 typedef unsigned int MSG_OPTION_TYPE_T;
66 * @brief Represents an SMS network mode. \n
67 * The values for this type SHOULD be in _MSG_SMS_NETWORK_MODE_E.
69 typedef unsigned char MSG_SMS_NETWORK_MODE_T;
73 * @brief Represents the period of playing alert tone. \n
74 * The values for this type SHOULD be in _MSG_ALERT_TONE_E.
76 typedef unsigned char MSG_ALERT_TONE_T;
80 * @brief Represents the default storage to save SMS. \n
81 * The values for this type SHOULD be in _MSG_SMS_SAVE_STORAGE_E.
83 typedef unsigned char MSG_SMS_SAVE_STORAGE_T;
87 * @brief Represents the type of number for SMS center address. \n
88 * The values for this type SHOULD be in _MSG_SMS_TON_E.
90 typedef unsigned char MSG_SMS_TON_T;
94 * @brief Represents the numbering plan ID for SMS center address. \n
95 * The values for this type SHOULD be in _MSG_SMS_NPI_E.
97 typedef unsigned char MSG_SMS_NPI_T;
101 * @brief Represents the protocol ID for SMS center address. \n
102 * The values for this type SHOULD be in _MSG_SMS_PID_E.
104 typedef unsigned char MSG_SMS_PID_T;
108 * @brief Represents the validity period of SMS. \n
109 * The values for this type SHOULD be in _MSG_VAL_PERIOD_E.
111 typedef unsigned char MSG_VAL_PERIOD_T;
115 * @brief Represents the class type of MMS. \n
116 * The values for this type SHOULD be in _MSG_MMS_MSG_CLASS_TYPE_E.
118 typedef unsigned char MSG_MMS_MSG_CLASS_TYPE_T;
122 * @brief Represents the expiry time of MMS. \n
123 * The values for this type SHOULD be in _MSG_MMS_EXPIRY_TIME_E.
125 typedef unsigned int MSG_MMS_EXPIRY_TIME_T;
129 * @brief Represents the delivery time of MMS. \n
130 * The values for this type SHOULD be in _MSG_MMS_DELIVERY_TIME_E.
132 typedef unsigned int MSG_MMS_DELIVERY_TIME_T;
136 * @brief Represents the reply charging type of MMS. \n
137 * The values for this type SHOULD be in _MSG_MMS_REPLY_CHARGING_TYPE_E.
139 typedef unsigned char MSG_MMS_REPLY_CHARGING_TYPE_T;
143 * @brief Represents the creation mode of MMS. \n
144 * The values for this type SHOULD be in _MSG_MMS_CREATION_MODE_E.
146 typedef unsigned char MSG_MMS_CREATION_MODE_T;
149 * @brief Represents the retrieve type for MMS home network. \n
150 * The values for this type SHOULD be in _MSG_MMS_HOME_RETRIEVE_TYPE_E.
152 typedef unsigned char MSG_MMS_HOME_RETRIEVE_TYPE_T;
156 * @brief Represents the retrieve type for MMS abroad network. \n
157 * The values for this type SHOULD be in _MSG_MMS_ABROAD_RETRIEVE_TYPE_E.
159 typedef unsigned char MSG_MMS_ABROAD_RETRIEVE_TYPE_T;
163 * @brief Represents the frequency of sending MMS read report. \n
164 * The values for this type SHOULD be in _MSG_MMS_SEND_READ_REPORT_E.
166 typedef unsigned char MSG_MMS_SEND_READ_REPORT_T;
170 * @brief Represents whether a push message is received or not. \n
171 * The values for this type SHOULD be in _MSG_PUSH_RECEIVE_TYPE_E.
173 typedef unsigned char MSG_PUSH_RECEIVE_TYPE_T;
177 * @brief Represents the service type for a push message. \n
178 * The values for this type SHOULD be in _MSG_PUSH_SERVICE_TYPE_E.
180 typedef unsigned char MSG_PUSH_SERVICE_TYPE_T;
184 * @brief Represents the language type for a cell broadcasting message. \n
185 * The values for this type SHOULD be in _MSG_CB_LANGUAGE_TYPE_E.
187 typedef unsigned char MSG_CB_LANGUAGE_TYPE_T;
191 * @brief Represents the SIM status from telephony. \n
192 * The values for this type SHOULD be in \ref _MSG_SIM_STATUS_E.
194 typedef unsigned char MSG_SIM_STATUS_T;
197 /*==================================================================================================
199 ==================================================================================================*/
202 * @brief Represents SMSC address information.
206 MSG_SMS_TON_T ton; /**< Type of number */
207 MSG_SMS_NPI_T npi; /**< Numbering plan ID */
208 char address[SMSC_ADDR_MAX+1]; /**< SMSC address */
209 } MSG_SMSC_ADDRESS_S;
213 * @brief Represents SMSC data information.
217 MSG_SMS_PID_T pid; /**< Protocol idendifier */
218 MSG_VAL_PERIOD_T valPeriod; /**< Validity period value */
219 char name[SMSC_NAME_MAX+1]; /**< SMSC name */
220 MSG_SMSC_ADDRESS_S smscAddr; /**< SMSC address structure */
225 * @brief Represents the information of a cell broadcasting channel.
229 bool bActivate; /**< Indicates whether the CB channel is activate or passive. */
230 unsigned int id; /**< Indicates the ID of a CB channel. */
231 char name[CB_CHANNEL_NAME_MAX+1]; /**< Indicates the name of a CB channel. */
232 } MSG_CB_CHANNEL_INFO_S;
236 * @brief Represents cell broadcasting channel information.
240 int channelCnt; /**< The count of CB channels */
241 MSG_CB_CHANNEL_INFO_S channelInfo[CB_CHANNEL_MAX]; /**< The structure of CB channel information */
246 * @brief Represents an general option.
250 bool bKeepCopy; /**< Indicates whether the SMS message copy is kept or not. */
251 MSG_ALERT_TONE_T alertTone; /**< Indicates the period of playing alert tone. */
252 bool bAutoErase; /**< Indicates whether the auto-erase option is enabled or not. */
257 * @brief Represents an SMS send option.
261 MSG_ENCODE_TYPE_T dcs; /**< Indicates the string encoding type. */
262 MSG_SMS_NETWORK_MODE_T netMode; /**< Indicates the network mode (CS/PS) to send SMS. */
263 bool bReplyPath; /**< Indicates whether the SMS reply path is set or not. */
264 bool bDeliveryReport; /**< Indicates whether the SMS delivery report will be sent or not. */
265 MSG_SMS_SAVE_STORAGE_T saveStorage; /**< Indicates the default storage to save SMS. */
270 * @brief Represents an SMSC list.
274 int selected; /**< Selected SMSC index */
275 int totalCnt; /**< The count of total SMSC addresses */
276 MSG_SMSC_DATA_S smscData[SMSC_LIST_MAX]; /**< SMSC data information list*/
281 * @brief Represents an MMS send option.
285 MSG_MMS_MSG_CLASS_TYPE_T msgClass;
286 MSG_PRIORITY_TYPE_T priority; /**< Indicates the priority of the message. */
287 MSG_MMS_EXPIRY_TIME_T expiryTime; /**< Indicates the time when the message is to be removed from the MMSC. */
288 MSG_MMS_DELIVERY_TIME_T deliveryTime; /**< Indicates the message transmission time which is set in the MMSC. */
289 unsigned int customDeliveryTime; /**< Indicates the message transmission time which is set in the MMSC. */
290 bool bSenderVisibility; /**< Indicates whether the address is hidden or not. */
291 bool bDeliveryReport; /**< Indicates whether the delivery report will be sent or not. */
292 bool bReadReply; /**< Indicates whether the read report will be sent or not. */
293 bool bKeepCopy; /**< Indicates whether the message copy is kept or not. */
294 bool bBodyReplying; /**< Indicates whether the body is included when replying or not. */
295 bool bHideRecipients; /**< Indicates whether the recipients are hidden or not. */
297 MSG_MMS_REPLY_CHARGING_TYPE_T replyCharging;
298 unsigned int replyChargingDeadline;
299 unsigned int /*long*/ replyChargingSize;
301 MSG_MMS_CREATION_MODE_T creationMode;
306 * @brief Represents an MMS receive option.
310 MSG_MMS_HOME_RETRIEVE_TYPE_T homeNetwork; /**< Indicates the retrieve type for MMS home network. */
311 MSG_MMS_ABROAD_RETRIEVE_TYPE_T abroadNetwok; /**< Indicates the retrieve type for MMS abroad network. */
312 bool readReceipt; /**< Indicates whether the read report will be sent or not. */
313 bool bDeliveryReceipt; /**< Indicates whether the delivery report will be sent or not. */
314 bool bRejectUnknown; /**< Indicates whether unknown addresses are rejected or not. */
315 bool bRejectAdvertisement; /**< Indicates whether advertisement is rejected or not. */
320 * @brief Represents an MMS style option.
324 unsigned int fontSize;
326 bool bFontStyleItalic;
327 bool bFontStyleUnderline;
328 unsigned int fontColorRed;
329 unsigned int fontColorGreen;
330 unsigned int fontColorBlue;
331 unsigned int fontColorHue;
332 unsigned int bgColorRed;
333 unsigned int bgColorGreen;
334 unsigned int bgColorBlue;
335 unsigned int bgColorHue;
336 unsigned int pageDur;
337 unsigned int pageCustomDur;
338 unsigned int pageDurManual;
339 } MSG_MMS_STYLEOPT_S;
343 * @brief Represents a push message option.
347 bool bReceive; /**< Indicates whether the push message is received or not. */
348 MSG_PUSH_SERVICE_TYPE_T serviceType; /**< Indicates the service type of a push message. */
353 * @brief Represents a cell broadcasting message option.
357 bool bReceive; /**< Indicates whether the CB message is received or not. */
358 bool bAllChannel; /**< Indicates whether All Channel's CB message is received or not. */
359 int maxSimCnt; /**< Indicates the number of channels which can be stored in SIM. */
360 MSG_CB_CHANNEL_S channelData; /**< Indicates the cell broadcasting channel information. */
361 bool bLanguage[CB_LANG_TYPE_MAX]; /**< Indicates whether the language name of a cell broadcasting message is set or not. */
366 * @brief Represents a voice mail number option.
370 char mailNumber[MAX_PHONE_NUMBER_LEN+1];
371 } MSG_VOICEMAIL_OPT_S;
375 * @brief Represents a MMS size option.
384 * @brief Represents setting information.
388 MSG_OPTION_TYPE_T type; /**< The option type in a setting */
392 MSG_GENERAL_OPT_S generalOpt; /**< General option */
393 MSG_SMS_SENDOPT_S smsSendOpt; /**< SMS send option */
394 MSG_SMSC_LIST_S smscList; /**< SMSC list option */
395 MSG_MMS_SENDOPT_S mmsSendOpt; /**< MMS send option */
396 MSG_MMS_RECVOPT_S mmsRecvOpt; /**< MMS receive option */
397 MSG_MMS_STYLEOPT_S mmsStyleOpt; /**< MMS style option */
398 MSG_PUSHMSG_OPT_S pushMsgOpt; /**< Push message option */
399 MSG_CBMSG_OPT_S cbMsgOpt; /**< Cell broadcasting message option */
400 MSG_VOICEMAIL_OPT_S voiceMailOpt; /**< voice mail option */
401 MSG_MSGSIZE_OPT_S msgSizeOpt; /**< MMS size option */
406 /*==================================================================================================
408 ==================================================================================================*/
411 * @brief Represents the values of an option type. \n
412 * This enum is used as the value of MSG_OPTION_TYPE_T.
414 enum _MSG_OPTION_TYPE_E
416 MSG_GENERAL_OPT, /**< General option */
417 MSG_SMS_SENDOPT, /**< SMS send option */
418 MSG_SMSC_LIST, /**< SMSC list option */
419 MSG_MMS_SENDOPT, /**< MMS send option */
420 MSG_MMS_RECVOPT, /**< MMS receive option */
421 MSG_MMS_CLASSOPT, /**< MMS class option such as personal, advertisement, and informational */
422 MSG_MMS_STYLEOPT, /**< MMS style option */
423 MSG_PUSHMSG_OPT, /**< Push message option */
424 MSG_CBMSG_OPT, /**< Cell broadcasting message option */
425 MSG_VOICEMAIL_OPT, /**< Voice mail option */
426 MSG_MSGSIZE_OPT, /**< Message size option */
431 * @brief Represents the values of an SMS network mode. \n
432 * This enum is used as the value of MSG_SMS_NETWORK_MODE_T.
434 enum _MSG_SMS_NETWORK_MODE_E
436 MSG_SMS_NETWORK_PS_ONLY = 0x01, /**< Packet switched */
437 MSG_SMS_NETWORK_CS_ONLY = 0x02, /**< Circuit switched */
438 MSG_SMS_NETWORK_PS_FIRST = 0x03, /**< Packet switching preferred */
443 * @brief Represents the value of period of playing alert tone. \n
444 * The values for this type SHOULD be in MSG_ALERT_TONE_T.
446 enum _MSG_ALERT_TONE_E
449 MSG_ALERT_TONE_2MINS,
450 MSG_ALERT_TONE_5MINS,
451 MSG_ALERT_TONE_10MINS,
456 * @brief Represents the value of a default storage to save SMS. \n
457 * The values for this type SHOULD be in MSG_SMS_SAVE_STORAGE_T.
459 enum _MSG_SMS_SAVE_STORAGE_E
461 MSG_SMS_SAVE_STORAGE_SIM,
462 MSG_SMS_SAVE_STORAGE_PHONE,
467 * @brief Represents the values of the type of number for SMS center address. \n
468 * This enum is used as the value of MSG_SMS_TON_T.
472 MSG_TON_UNKNOWN = 0, /**< Unknown */
473 MSG_TON_INTERNATIONAL, /**< International */
474 MSG_TON_NATIONAL, /**< National */
475 MSG_TON_NETWORK, /**< Network */
476 MSG_TON_SUBSCRIBER, /**< Subscriber */
477 MSG_TON_ALPHANUMERIC, /**< Alpha numeric */
478 MSG_TON_ABBREVIATED, /**< Abbreviated */
479 MSG_TON_RESERVE, /**< Reserve */
484 * @brief Represents the values of the numbering plan ID for SMS center address. \n
485 * This enum is used as the value of MSG_SMS_NPI_T.
489 MSG_NPI_UNKNOWN = 0, /**< Unknown */
490 MSG_NPI_ISDN = 1, /**< ISDN */
491 MSG_NPI_DATA = 3, /**< Data */
492 MSG_NPI_TELEX = 4, /**< Telex */
493 MSG_NPI_SMSC = 5, /**< SMSC */
494 MSG_NPI_NATIONAL = 8, /**< National */
495 MSG_NPI_PRIVATE = 9, /**< Private */
496 MSG_NPI_IDENTIFICATION_ERMES = 10, /**< Identification ermes */
497 MSG_NPI_IDENTIFICATION_RESERVED = 0xF /**< Identification reserved */
502 * @brief Represents the values of the protocol ID for SMS center address. \n
503 * This enum is used as the value of MSG_SMS_PID_T.
507 MSG_PID_NONE, /**< None */
508 MSG_PID_TEXT, /**< Text */
509 MSG_PID_VOICE, /**< Voice */
510 MSG_PID_FAX, /**< Fax */
511 MSG_PID_X400, /**< X400 */
512 MSG_PID_ERMES, /**< Ermes */
513 MSG_PID_EMAIL, /**< Email */
514 MSG_PID_MAX /**< Default */
519 * @brief Represents the values of the Validity Period for SMS center. \n
520 * This enum is used as the value of MSG_VAL_PERIOD_T.
522 enum _MSG_VAL_PERIOD_E
527 MSG_VAL_2WEEKS = 180,
528 MSG_VAL_MAXIMUM = 255,
532 enum _MSG_MMS_EXPIRY_TIME_E
534 MSG_EXPIRY_TIME_MAXIMUM = 0,
535 MSG_EXPIRY_TIME_1DAY = 86400,
536 MSG_EXPIRY_TIME_2DAYS = 2*86400,
537 MSG_EXPIRY_TIME_1WEEK = 604800,
538 MSG_EXPIRY_TIME_2WEEKS = 2*604800,
542 enum _MSG_MMS_DELIVERY_TIME_E
544 MSG_DELIVERY_TIME_IMMEDIATLY = 0,
545 MSG_DELIVERY_TIME_1HOUR = 3600,
546 MSG_DELIVERY_TIME_1DAY = 86400,
547 MSG_DELIVERY_TIME_1WEEK = 604800,
548 MSG_DELIVERY_TIME_CUSTOM
552 enum _MSG_MMS_MSG_CLASS_TYPE_E
554 MSG_CLASS_PERSONAL, /**<Personal message class*/
555 MSG_CLASS_ADVERTISEMENT, /**<Advertisement message class*/
556 MSG_CLASS_INFORMATIONAL, /**<Informational message class */
557 MSG_CLASS_AUTO, /**<Automatic */
558 MSG_CLASS_MAX /**< */
562 enum _MSG_MMS_REPLY_CHARGING_TYPE_E
564 MSG_REPLY_CHARGING_NONE, /**<Reply-Charging none */
565 MSG_REPLY_CHARGING_REQUESTED, /**<Reply-Charging requested */
566 MSG_REPLY_CHARGING_REQUESTED_TEXT_ONLY, /**<Reply-Charging requested text-only */
567 MSG_REPLY_CHARGING_ACCEPTED, /**<Reply-Charging accepted */
568 MSG_REPLY_CHARGING_ACCEPTED_TEXT_ONLY, /**<Reply-Charging accepted text-only */
569 MSG_REPLY_CHARGING_MAX
573 enum _MSG_MMS_CREATION_MODE_E
575 MSG_CREATION_MODE_RESTRICTED,
576 MSG_CREATION_MODE_WARNING,
577 MSG_CREATION_MODE_FREE
582 * @brief Represents the values of the retrieve type for MMS home network. \n
583 * This enum is used as the value of MSG_MMS_HOME_RETRIEVE_TYPE_T.
585 enum _MSG_MMS_HOME_RETRIEVE_TYPE_E
587 MSG_HOME_AUTO_DOWNLOAD, /**< Home auto download */
588 MSG_HOME_MANUAL, /**< Home manual */
589 MSG_HOME_RESTRICTED, /**< Home restricted */
590 MSG_HOME_REJECT, /**< Home reject */
591 MSG_HOME_MAX /**< Default */
596 * @brief Represents the values of the retrieve type for MMS abroad network. \n
597 * This enum is used as the value of MSG_MMS_ABROAD_RETRIEVE_TYPE_T.
599 enum _MSG_MMS_ABROAD_RETRIEVE_TYPE_E
601 MSG_ABROAD_AUTO_DOWNLOAD, /**< Abroad auto download */
602 MSG_ABROAD_MANUAL, /**< Abroad manual */
603 MSG_ABROAD_RESTRICTED, /**< Abroad restricted */
604 MSG_ABROAD_REJECT, /**< Abroad reject */
605 MSG_ABROAD_MAX /**< Default */
610 * @brief Represents the values of the frequency of sending MMS read report. \n
611 * This enum is used as the value of MSG_MMS_SEND_READ_REPORT_T.
613 enum _MSG_MMS_SEND_READ_REPORT_E
615 MSG_SEND_READ_REPORT_ALWAYS, /**< Read report always */
616 MSG_SEND_READ_REPORT_NEVER, /**< Read report never */
617 MSG_SEND_READ_REPORT_REQUEST, /**< Read report request */
618 MSG_SEND_READ_REPORT_MAX /**< Default */
623 * @brief Represents the values of the service type for a push message. \n
624 * This enum is used as the value of MSG_PUSH_SERVICE_TYPE_T.
626 enum _MSG_PUSH_SERVICE_TYPE_E
628 MSG_PUSH_SERVICE_ALWAYS, /**< Push message service always */
629 MSG_PUSH_SERVICE_PROMPT, /**< Push message service prompt */
630 MSG_PUSH_SERVICE_NEVER, /**< Push message service never */
635 * @brief Represents the values of the language type for a cell broadcasting message. \n
636 * This enum is used as the value of MSG_CB_LANGUAGE_TYPE_T.
638 enum _MSG_CB_LANGUAGE_TYPE_E
640 MSG_CBLANG_TYPE_ALL, /**< CB check all */
641 MSG_CBLANG_TYPE_ENG, /**< CB message English */
642 MSG_CBLANG_TYPE_GER, /**< CB message Germany */
643 MSG_CBLANG_TYPE_FRE, /**< CB message France */
644 MSG_CBLANG_TYPE_ITA, /**< CB message Italy */
645 MSG_CBLANG_TYPE_NED, /**< CB message Netherland */
646 MSG_CBLANG_TYPE_SPA, /**< CB message Spain */
647 MSG_CBLANG_TYPE_POR, /**< CB message Portugal */
648 MSG_CBLANG_TYPE_SWE, /**< CB message Sweden */
649 MSG_CBLANG_TYPE_TUR, /**< CB message Turkey */
650 MSG_CBLANG_TYPE_MAX /**< Default */
655 * @brief Represents the values of SIM status. \n
656 * This enum is used as the value of MSG_SIM_STATUS_T.
658 enum _MSG_SIM_STATUS_E
660 MSG_SIM_STATUS_NORMAL = 0,
661 MSG_SIM_STATUS_CHANGED,
662 MSG_SIM_STATUS_NOT_FOUND,
670 #endif // MSG_SETTING_TYPES_H