From cc5276a732423b70338afb7d5ea1d027d00204be Mon Sep 17 00:00:00 2001 From: Kyeonghun Lee Date: Tue, 13 Jun 2017 15:10:06 +0900 Subject: [PATCH] change type of setting value for group message Change-Id: I8a5a65963fc27e2fe496578b9cd7b7ec23f7173c Signed-off-by: Kyeonghun Lee --- framework/setting-handler/MsgSettingHandler.cpp | 6 +++++- include/common/MsgSettingTypes.h | 9 ++++++++- include/mapi/msg_types.h | 14 +++++++++++++- mapi/msg_setting.cpp | 12 ++++++------ 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/framework/setting-handler/MsgSettingHandler.cpp b/framework/setting-handler/MsgSettingHandler.cpp index 671958e..87944f3 100755 --- a/framework/setting-handler/MsgSettingHandler.cpp +++ b/framework/setting-handler/MsgSettingHandler.cpp @@ -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; } diff --git a/include/common/MsgSettingTypes.h b/include/common/MsgSettingTypes.h index e13308e..7aa6b67 100755 --- a/include/common/MsgSettingTypes.h +++ b/include/common/MsgSettingTypes.h @@ -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; diff --git a/include/mapi/msg_types.h b/include/mapi/msg_types.h index e319804..d402931 100755 --- a/include/mapi/msg_types.h +++ b/include/mapi/msg_types.h @@ -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. */ diff --git a/mapi/msg_setting.cpp b/mapi/msg_setting.cpp index 594f0cd..739dde1 100755 --- a/mapi/msg_setting.cpp +++ b/mapi/msg_setting.cpp @@ -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; -- 2.7.4