/*vconf keys*/
#define MSG_SIM_IMSI "memory/private/msg-service/sim_imsi"
#define MSG_SIM_CHANGED "memory/private/msg-service/sim_changed"
-
+#define MSG_SIM_MSISDN "memory/private/msg-service/msisdn"
#define DEFAULT_SETTING_PATH "db/private/msg-service"
==================================================================================================*/
#define USER_TAG "MSG_FW"
+#define MSG_SMS_VALID_TAG "VLD_SMS"
+#define MSG_MMS_VALID_TAG "VLD_MMS"
+
#define DLOG_ENABLE
//#define LOG_ENABLE
(unsigned int)(__dm)); \
} while (0)
+
+#define MSG_SMS_VLD(fmt, ...)\
+ do\
+ {\
+ SLOG(LOG_DEBUG, MSG_SMS_VALID_TAG, "%s, "fmt"\n", __TIMESTAMP__, ##__VA_ARGS__);\
+ } while (0)
+
+#define MSG_MMS_VLD(fmt, ...)\
+ do\
+ {\
+ SLOG(LOG_DEBUG, MSG_MMS_VALID_TAG, "%s, "fmt"\n", __TIMESTAMP__, ##__VA_ARGS__);\
+ } while (0)
+
#elif defined(LOG_ENABLE)
#define MSG_FATAL(fmt, ...) \
vconftool set -t int memory/private/msg-service/sim_changed 0 -i
vconftool set -t string memory/private/msg-service/sim_imsi "" -i
vconftool set -t bool memory/private/msg-service/national_sim 0 -i
+vconftool set -t string memory/private/msg-service/msisdn "" -i
/sbin/ldconfig
/bin/systemctl daemon-reload
#endif
}
+void TapiEventGetMsisdnInfo(TapiHandle *handle, int result, void *data, void *user_data)
+{
+#if 0 // New TAPI
+ MSG_DEBUG("TapiEventGetMsisdnInfo is called.");
+
+ if (result != TAPI_SIM_ACCESS_SUCCESS || data == NULL)
+ {
+ MSG_DEBUG("Error. data is NULL.");
+ return;
+ }
+
+ TelSimMsisdnList_t *list = (TelSimMsisdnList_t *)data;
+
+ for (int i = 0; i < list->count; i++) {
+ if (list->list[i].num[0] != '\0') {
+ if (MsgSettingSetString(MSG_SIM_MSISDN, list->list[i].num) == MSG_SUCCESS)
+ MSG_DEBUG("Get MSISDN from SIM : [%s]", list->list[i].num);
+ else
+ MSG_DEBUG("Getting MSISDN is failed!");
+
+ break;
+ }
+ }
+#endif
+}
+
void TapiEventSatSmsRefresh(TapiHandle *handle, int result, void *data, void *user_data)
{
MSG_DEBUG("TapiEventSatSmsRefresh is called.");
if (getVoiceMailInfo(&tmpVoiceMail) == true) {
MSG_DEBUG("######## getVoiceMailInfo Success !!! #######");
} else {
- MSG_DEBUG("######## getVoiceMailInfo Fail !!! #######", err);
+ MSG_DEBUG("######## getVoiceMailInfo Fail !!! #######");
}
if (getMwiInfo() == true) {
MSG_DEBUG("######## getMwiInfo Success !!! #######");
} else {
- MSG_DEBUG("######## getMwiInfo Fail !!! #######", err);
+ MSG_DEBUG("######## getMwiInfo Fail !!! #######");
+ }
+
+ if (getMsisdnInfo() == true) {
+ MSG_DEBUG("######## getMsisdnInfo Success !!! #######");
+ } else {
+ MSG_DEBUG("######## getMsisdnInfo Fail !!! #######");
}
}
if (tapiRet == TAPI_API_SUCCESS)
{
- MSG_DEBUG("######## TelTapiSmsSend Success !!! req Id : [%d] return : [%d] #######", reqId, tapiRet);
+ MSG_DEBUG("######## TelTapiSmsSend Success !!! return : [%d] #######", tapiRet);
}
else
{
SmsPluginEventHandler::instance()->handleSentStatus(MSG_NETWORK_SEND_FAIL);
- THROW(MsgException::SMS_PLG_ERROR, "######## TelTapiSmsSend Fail !!! req Id : [%d] return : [%d] #######", reqId, tapiRet);
+ THROW(MsgException::SMS_PLG_ERROR, "######## TelTapiSmsSend Fail !!! return : [%d] #######", tapiRet);
}
+ // Tizen Validation System
+ char *msisdn = NULL;
+ msisdn = MsgSettingGetString(MSG_SIM_MSISDN);
+
+ MSG_SMS_VLD("[SMS INFO] %d, SMS Send Start, %s->%s, %s", pReqInfo->msgInfo.msgId, \
+ (msisdn == NULL)?"ME":msisdn, \
+ pReqInfo->msgInfo.addressList[0].addressVal, \
+ (tapiRet == TAPI_API_SUCCESS)?"Success":"Fail");
+
+ MSG_SMS_VLD("[SMS TEXT] %d, [%s]", pReqInfo->msgInfo.msgId, pReqInfo->msgInfo.msgText);
+
msg_network_status_t retStatus = getNetStatus();
+ MSG_SMS_VLD("[SMS INFO] %d, SMS Send End, %s->%s, %s", pReqInfo->msgInfo.msgId, \
+ (msisdn == NULL)?"ME":msisdn, \
+ pReqInfo->msgInfo.addressList[0].addressVal, \
+ (retStatus == MSG_NETWORK_SEND_SUCCESS)?"Success":"Fail");
+
+
if (retStatus == MSG_NETWORK_SEND_SUCCESS)
{
- MSG_DEBUG("######## Msg Sent was Successful !!! req Id : [%d] return : [%d] #######", reqId, retStatus);
+ MSG_DEBUG("######## Msg Sent was Successful !!! return : [%d] #######", retStatus);
}
else
{
SmsPluginEventHandler::instance()->handleSentStatus(MSG_NETWORK_SEND_FAIL);
- THROW(MsgException::SMS_PLG_ERROR, "######## Msg Sent was Failed !!! req Id : [%d] return : [%d] #######", reqId, retStatus);
+ THROW(MsgException::SMS_PLG_ERROR, "######## Msg Sent was Failed !!! return : [%d] #######", retStatus);
}
if (tpdu.data.submit.userData.headerCnt > 0) tpdu.data.submit.userData.headerCnt--;
void TapiEventSetMwiInfo(TapiHandle *handle, int result, void *data, void *user_data);
void TapiEventGetMwiInfo(TapiHandle *handle, int result, void *data, void *user_data);
+void TapiEventGetMsisdnInfo(TapiHandle *handle, int result, void *data, void *user_data);
+
void TapiEventGetParamCnt(TapiHandle *handle, int result, void *data, void *user_data);
void TapiEventGetParam(TapiHandle *handle, int result, void *data, void *user_data);
void setVoiceMailInfo(const MSG_VOICEMAIL_OPT_S *pVoiceOpt);
bool getVoiceMailInfo(MSG_VOICEMAIL_OPT_S *pVoiceOpt);
bool getMwiInfo(void);
+ bool getMsisdnInfo(void);
int getParamCntEvent();
bool getParamEvent(MSG_SMSC_DATA_S *pSmscData);