change type of setting value for group message 80/133680/2 submit/tizen/20170615.065243
authorKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 13 Jun 2017 06:10:06 +0000 (15:10 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Thu, 15 Jun 2017 00:58:36 +0000 (09:58 +0900)
Change-Id: I8a5a65963fc27e2fe496578b9cd7b7ec23f7173c
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
framework/setting-handler/MsgSettingHandler.cpp
include/common/MsgSettingTypes.h
include/mapi/msg_types.h
mapi/msg_setting.cpp

index 671958e..87944f3 100755 (executable)
@@ -637,7 +637,7 @@ msg_error_t MsgSetMMSRecvOpt(const MSG_SETTING_S *pSetting)
        }
 
        if (g_mmsRecvOpt.bGroupMessage != recvOpt.bGroupMessage) {
-               if (MsgSettingSetBool(MMS_RECV_GROUP_MESSAGE, recvOpt.bGroupMessage) != MSG_SUCCESS) {
+               if (MsgSettingSetInt(MMS_RECV_GROUP_MESSAGE, recvOpt.bGroupMessage) != MSG_SUCCESS) {
                        MSG_ERR("Error to set config data [%s]", MMS_RECV_GROUP_MESSAGE);
                        return MSG_ERR_SET_SETTING;
                }
@@ -1153,6 +1153,10 @@ void MsgGetMMSRecvOpt(MSG_SETTING_S *pSetting)
 
        if (MsgSettingGetBool(MMS_RECV_REJECT_ADVERTISE, &pSetting->option.mmsRecvOpt.bRejectAdvertisement) != MSG_SUCCESS)
                MSG_INFO("MsgSettingGetBool() is failed");
+
+       if (MsgSettingGetInt(MMS_RECV_GROUP_MESSAGE, &tmpVal) != MSG_SUCCESS)
+               MSG_INFO("MsgSettingGetInt() is failed");
+       pSetting->option.mmsRecvOpt.bGroupMessage = (MSG_MMS_GROUP_MESSAGE_MODE_T)tmpVal;
 }
 
 
index e13308e..7aa6b67 100755 (executable)
@@ -151,6 +151,13 @@ typedef unsigned char MSG_MMS_ABROAD_RETRIEVE_TYPE_T;
 
 
 /**
+ *     @brief  Represents the group message mode for MMS. \n
+ *     The values for this type SHOULD be in _MSG_MMS_GROUP_MESSAGE_MODE_E.
+ */
+typedef unsigned char MSG_MMS_GROUP_MESSAGE_MODE_T;
+
+
+/**
  *     @brief  Represents the frequency of sending MMS read report. \n
  *     The values for this type SHOULD be in _MSG_MMS_SEND_READ_REPORT_E.
  */
@@ -329,7 +336,7 @@ typedef struct {
        bool                            bDeliveryReceipt;                       /**< Indicates whether the delivery report will be sent or not. */
        bool                            bRejectUnknown;                 /**< Indicates whether unknown addresses are rejected or not. */
        bool                            bRejectAdvertisement;   /**< Indicates whether advertisement is rejected or not. */
-       bool                            bGroupMessage;                  /**< Indicates whether group message option is enable or not. */
+       MSG_MMS_GROUP_MESSAGE_MODE_T    bGroupMessage;                  /**< Indicates whether group message option. */
 } MSG_MMS_RECVOPT_S;
 
 
index e319804..d402931 100755 (executable)
@@ -709,7 +709,7 @@ enum _MSG_STRUCT_MMS_RECV_OPT_E {
        MSG_MMS_RECVOPT_DELIVERY_REPORT_BOOL,                                       /**< Indicates whether the delivery report will be sent or not. */
        MSG_MMS_RECVOPT_REJECT_UNKNOWN_BOOL,                                        /**< Indicates whether unknown addresses are rejected or not. */
        MSG_MMS_RECVOPT_REJECT_ADVERTISEMENT_BOOL,                                  /**< Indicates whether advertisement is rejected or not. */
-       MSG_MMS_RECVOPT_GROUP_MESSAGE_BOOL,                                         /**< Indicates whether group message option is enable or not. */
+       MSG_MMS_RECVOPT_GROUP_MESSAGE_INT,                                         /**< Indicates whether group message option. See enum _MSG_MMS_GROUP_MESSAGE_MODE_E*/
 };
 
 /**
@@ -2010,6 +2010,18 @@ enum _MSG_MMS_ABROAD_RETRIEVE_TYPE_E {
 
 
 /**
+ *  @brief  Enumeration for the values of the mode for group message feature. \n
+ *             This enum is used as the value of MSG_MMS_GROUP_MESSAGE_MODE_T.
+ */
+enum _MSG_MMS_GROUP_MESSAGE_MODE_E {
+       MSG_GROUP_MESSAGE_NOT_AVAILABLE,   /**< Group message feature not available(in case of SIM has no MSISDN) */
+       MSG_GROUP_MESSAGE_OFF,   /**< Group message feature off */
+       MSG_GROUP_MESSAGE_ON,   /**< Group message feature on */
+       MSG_GROUP_MESSAGE_MAX              /**< Default */
+};
+
+
+/**
  *  @brief  Enumeration for the values of the frequency of sending MMS read report. \n
  *             This enum is used as the value of MSG_MMS_SEND_READ_REPORT_T.
  */
index 594f0cd..739dde1 100755 (executable)
@@ -1228,6 +1228,9 @@ int msg_get_mms_recv_opt_int(void *mms_recv_opt, int field, int *value)
        case MSG_MMS_RECVOPT_ABROAD_RETRIEVE_TYPE_INT:
                *value = recv_opt->abroadNetwork;
                break;
+       case MSG_MMS_RECVOPT_GROUP_MESSAGE_INT:
+               *value = recv_opt->bGroupMessage;
+               break;
        default:
                ret = MSG_ERR_INVALID_PARAMETER;
                break;
@@ -1252,6 +1255,9 @@ int msg_set_mms_recv_opt_int(void *mms_recv_opt, int field, int value)
        case MSG_MMS_RECVOPT_ABROAD_RETRIEVE_TYPE_INT:
                recv_opt->abroadNetwork = value;
                break;
+       case MSG_MMS_RECVOPT_GROUP_MESSAGE_INT:
+               recv_opt->bGroupMessage = value;
+               break;
        default:
                ret = MSG_ERR_INVALID_PARAMETER;
                break;
@@ -1282,9 +1288,6 @@ int msg_get_mms_recv_opt_bool(void *mms_recv_opt, int field, bool *value)
        case MSG_MMS_RECVOPT_REJECT_ADVERTISEMENT_BOOL:
                *value = recv_opt->bRejectAdvertisement;
                break;
-       case MSG_MMS_RECVOPT_GROUP_MESSAGE_BOOL:
-               *value = recv_opt->bGroupMessage;
-               break;
        default:
                ret = MSG_ERR_INVALID_PARAMETER;
                break;
@@ -1315,9 +1318,6 @@ int msg_set_mms_recv_opt_bool(void *mms_recv_opt, int field, bool value)
        case MSG_MMS_RECVOPT_REJECT_ADVERTISEMENT_BOOL:
                recv_opt->bRejectAdvertisement = value;
                break;
-       case MSG_MMS_RECVOPT_GROUP_MESSAGE_BOOL:
-               recv_opt->bGroupMessage = value;
-               break;
        default:
                ret = MSG_ERR_INVALID_PARAMETER;
                break;