TelSmsDatapackageInfo_t* pDataPackage = (TelSmsDatapackageInfo_t*)data;
SMS_TPDU_S tpdu;
+ memset(&tpdu, 0x00, sizeof(SMS_TPDU_S));
// Decode Incoming Message
SmsPluginTpduCodec::decodeTpdu(pDataPackage->szData, pDataPackage->MsgLength, &tpdu);
{
if (tpdu.tpduType == SMS_TPDU_DELIVER)
{
- if (SmsPluginConcatHandler::instance()->IsConcatMsg(&(tpdu.data.deliver.userData)) == true ||
- SmsPluginWapPushHandler::instance()->IsWapPushMsg(&(tpdu.data.deliver.userData)) == true)
- {
- SmsPluginConcatHandler::instance()->handleConcatMsg(&tpdu); // Call Concat Msg Handler
+ if (tpdu.data.deliver.dcs.msgClass == SMS_MSG_CLASS_2) {
+ // For GCF test, 34.2.5.3
+ SmsPluginSimMsg::instance()->setSmsData((const char*)pDataPackage->Sca, (const char *)pDataPackage->szData, pDataPackage->MsgLength);
}
- else
- {
- SmsPluginEventHandler::instance()->handleMsgIncoming(&tpdu); // Call Event Handler
+
+ if (tpdu.data.deliver.dcs.codingGroup == SMS_GROUP_DISCARD) {
+ if (tpdu.data.deliver.dcs.bIndActive == false) {
+ SmsPluginSetting::instance()->setMwiInfo(tpdu.data.deliver.dcs.indType + MSG_MWI_VOICE_SMS, 0);
+ }
+ SmsPluginTransport::instance()->sendDeliverReport(MSG_SUCCESS);
+ } else {
+ if (SmsPluginConcatHandler::instance()->IsConcatMsg(&(tpdu.data.deliver.userData)) == true ||
+ SmsPluginWapPushHandler::instance()->IsWapPushMsg(&(tpdu.data.deliver.userData)) == true)
+ {
+ SmsPluginConcatHandler::instance()->handleConcatMsg(&tpdu); // Call Concat Msg Handler
+ }
+ else
+ {
+ SmsPluginEventHandler::instance()->handleMsgIncoming(&tpdu); // Call Event Handler
+ }
}
}
else if (tpdu.tpduType == SMS_TPDU_STATUS_REP)
}
MSG_DEBUG("headerCnt [%d]", tpdu.data.deliver.userData.headerCnt);
-
for (int i = 0; i < tpdu.data.deliver.userData.headerCnt; i++)
{
// Handler Concatenated Message
{
MSG_DEBUG("TapiEventSaveSimMsg is called. result [%d]", result);
- if (result != TAPI_API_SUCCESS || data == NULL)
- {
- MSG_DEBUG("Error. data is NULL.");
- SmsPluginSimMsg::instance()->setSimEvent((msg_sim_id_t)0, false);
- return;
- }
+ int simId = -1;
+
+ if (data != NULL)
+ simId = *((int*)data);
+ else
+ MSG_DEBUG("Data(SIM Msg ID) is NULL");
+
+ SmsPluginSimMsg::instance()->setSaveSimMsgEvent(simId, result);
+}
- int simId = *((int*)data);
- MSG_DEBUG("sim ID : [%d], status : [%d]", simId, (TelSmsCause_t)result);
+void TapiEventSaveClass2Msg(TapiHandle *handle, int result, void *data, void *user_data)
+{
+ MSG_DEBUG("TapiEventSaveSimMsg is called. result [%d]", result);
- SmsPluginSimMsg::instance()->setSimEvent((msg_sim_id_t)simId, true);
+ int simId = -1;
+ if (data != NULL)
+ simId = *((int*)data);
+ else
+ MSG_DEBUG("Data(SIM Msg ID) is NULL");
+
+ SmsPluginSimMsg::instance()->setSaveClass2MsgEvent(simId, result);
}
{
MSG_DEBUG("SMSC Address is not present");
+// smscData.smscAddr.ton = MSG_TON_UNKNOWN;
+// smscData.smscAddr.npi = MSG_NPI_UNKNOWN;
+//
+// memset(smscData.smscAddr.address, 0x00, SMSC_ADDR_MAX+1);
+// memset(smscData.name, 0x00, SMSC_NAME_MAX+1);
+
SmsPluginSetting::instance()->setParamEvent(NULL, -1, false);
return;
MSG_DEBUG("MSG_PID_TEXT is inserted to PID");
}
+#if 0
+ /*Get the DCS value*/
+ if (0x00 == (0x08 & smsParam->ParamIndicator))
+ {
+ smscList.smscData[index].dcs = smsParam->TpDataCodingScheme;
+ MSG_DEBUG("dcs : %d", smscList.smscData[index].dcs);
+ }
+ else
+ {
+ smscList.smscData[index].dcs = MSG_ENCODE_GSM7BIT;
+ MSG_DEBUG("DCS is not present");
+ }
+#endif
+
/*Get the ValidityPeriod value*/
if (0x00 == (0x10 & smsParam->ParamIndicator))
{
void TapiEventSetMailboxInfo(TapiHandle *handle, int result, void *data, void *user_data)
{
- MSG_DEBUG("TapiEventSetMailboxInfo is called.");
+ MSG_DEBUG("TapiEventSetMailboxInfo is called. result = [%d]", result);
+
+ bool bRet = true;
+
+ if (result != TAPI_SIM_ACCESS_SUCCESS)
+ bRet = false;
+
+ SmsPluginSetting::instance()->setResultFromSim(bRet);
}
void TapiEventGetMailboxInfo(TapiHandle *handle, int result, void *data, void *user_data)
{
-#if 0 // New TAPI
MSG_DEBUG("TapiEventGetMailboxInfo is called.");
if (result != TAPI_SIM_ACCESS_SUCCESS || data == NULL)
}
SmsPluginSetting::instance()->setMailboxInfoEvent(&mbList, true);
-#endif
}
void TapiEventSetMwiInfo(TapiHandle *handle, int result, void *data, void *user_data)
{
- MSG_DEBUG("TapiEventSetMwiInfo is called.");
+ MSG_DEBUG("TapiEventSetMwiInfo is called. result = [%d]", result);
+
+ bool bRet = true;
+
+ if (result != TAPI_SIM_ACCESS_SUCCESS)
+ bRet = false;
+
+ SmsPluginSetting::instance()->setResultFromSim(bRet);
}
void TapiEventGetMwiInfo(TapiHandle *handle, int result, void *data, void *user_data)
{
-#if 0 // New TAPI
MSG_DEBUG("TapiEventGetMwiInfo is called.");
if (result != TAPI_SIM_ACCESS_SUCCESS || data == NULL)
memcpy(&simMwiInfo, MwiInfo, sizeof(SMS_SIM_MWI_INFO_S));
SmsPluginSetting::instance()->setMwiInfoEvent(&simMwiInfo, true);
-#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)
break;
}
}
-#endif
}
void TapiEventSatSmsRefresh(TapiHandle *handle, int result, void *data, void *user_data)
}
+
void TapiEventSatMoSmsCtrl(TapiHandle *handle, int result, void *data, void *user_data)
{
MSG_DEBUG("TapiEventSatMoSmsCtrl is called.");