MTK 发送彩信函数

  • 格式:txt
  • 大小:14.91 KB
  • 文档页数:6
message_send_p->bReadReport = (g_jmms_context->sending_settings.read_report == 1) ? E_TRUE : E_FALSE;
message_send_p->bHideSender = (g_jmms_context->sending_settings.hide_sender == 1) ? E_TRUE : E_FALSE;
if (wap_get_user_agent_brand() == EM_WAP_USERAGENT_BRAND_SE)
message_send_p->uiDate = get_current_utc_time();
message_send_p->bDeliveryReport = (g_jmms_context->sending_settings.delivery_report == 1) ? E_TRUE : E_FALSE;
}
message_send_p->pTo = (JC_CHAR*) g_jmms_context->to_p;
U8 ret = 0;
S32 len = 0;
MSG_HANDLE msg_handle = jmms_context_p->msg_handle;
/* free any allocated memory */
mmi_jmms_free_mms_pdu_memory(g_jmms_context);
if (message_send_p->pReplyChargingInfo == NULL){
mmi_jmms_free_mms_pdu_memory(g_jmms_context);
return JC_ERR_MEMORY_ALLOCATION;
}
switch (g_jmms_context->sending_settings.request_type){
break;
case E_VALIDITY_PERIOD_1WEEK:
message_send_p->uiExpiryTime = 1 * 7 * 24 * 3600;
break;
default:
if (wap_get_user_agent_brand() != EM_WAP_USERAGENT_BRAND_SE)
mmi_jmms_free_mms_pdu_memory(g_jmms_context);
return JC_ERR_MEMORY_ALLOCATION;
}
g_jmms_context->msg_header_type_p = (MESSAGE_SEND*)jdd_MemAlloc(sizeof(MESSAGE_SEND), 1);
case E_FULL_MMS:
message_send_p->pReplyChargingInfo->eReplyCharging = E_REQUEST_REPLY_CHARGING;
break;
case E_TEXT_ONLY:
message_send_p->pReplyChargingInfo->eReplyCharging = E_REQUEST_TEXT_ONLY_REPLY_CHARGING;
(JC_UINT32) (gui_atoi((UI_string_type) g_jmms_context->sending_settings.deadline_for_reply_buffer) * 3600);
message_send_p->pReplyChargingInfo->uiSize =
break;
case E_24_HRS:
message_send_p->uiDeliveryTime = 24 * 3600;
break;
default:
message_send_p->uiDeliveryTime = 0;
break;
}
message_send_p->uiExpiryTime = MAX_VALIDITY_PERIOD_VALUE;
break;
}
switch (g_jmms_context->sending_settings.delivery_time){
case E_IMMEDIATE:
message_send_p->uiExpiryTime = 0;
switch (g_jmms_context->sending_settings.validity_period){
case E_VALIDITY_PERIOD_MAX:
if (wap_get_user_agent_brand() != EM_WAP_USERAGENT_BRAND_SE)
* 以一个新函数,采用原来的函数里的代码,但是剔除了和GUI
* 有关的部分代码,在MyApp_send_mms()中被调用
*/
JC_RETCODE MyApp_jmms_create_and_send_new_mms(
U16 message_setting,
mmi_jmms_context_struct *jmms_context_p,
message_send_p->uiDeliveryTime = 0;
break;
case E_1_HR:
message_send_p->uiDeliveryTime = 3600;
break;
case E_12_HRS:
message_send_p->uiDeliveryTime = 12 * 3600;
}
msg_headers_p = g_jmms_context->msg_headers_p;
message_send_p = g_jmms_context->msg_header_type_p;
ret_code = mmi_jmms_set_mmsc_version();
/*
* 取自系统内的函数 mmi_jmms_create_and_send_new_mms(...);
* 函数的作用是将已经配置好的彩信mms结构体g_jmms_context
* 发送出去,但是因为原函数中有涉及到GUI的代码,如果直接
* 调用该函数发送mms,会造成程序自动退出,所以这里自己定
/* error handler */
if (NULL == g_jmms_context->msg_header_type_p){
mmi_jmms_free_mms_pdu_memory(g_jmms_context);
return JC_ERR_MEMORY_ALLOCATION;
g_jmms_context->msg_headers_p = (MESSAGE_HEADERS*)jdd_MemAlloc(sizeof(MESSAGE_HEADERS), 1);
/* error handler */
if (NULL == g_jmms_context->msg_headers_p){
if (g_jmms_context->rc_info != NULL){
message_send_p->pReplyChargingInfo->pszReplyId =
(JC_INT8*) jdi_UtilsStrdup(g_jmms_context->rc_info->pReplyMsgID);
message_send_p->eMsgPriority = (g_jmms_context->sending_settings.priority);
if (g_jmms_context->sending_settings.reply_charging == E_ON){
message_send_p->pReplyChargingInfo = (REPLY_CHARGING*)jdd_MemAlloc(sizeof(REPLY_CHARGING), 1);
g_jmms_context->to_p = mmi_jmms_get_to_addresses();
if (g_jmms_context->to_p == NULL){
mmi_jmms_free_mms_pdu_memory(g_jmms_context);
return JC_ERR_MEMORY_ALLOCATION;
((JC_UINT32) gui_atoi((UI_string_type) g_jmms_context->sending_settings.reply_msg_size_buffer)) * 1000;
}
/* Added by Deepali for reply charging. */
/* error handler */
if (ret_code != JC_OK){
mmi_jmms_free_mms_pdu_memory(g_jmms_context);
return ret_code;
}
message_send_p->pVersion = (JC_INT8*) g_jmms_context->version;
message_send_p->uiExpiryTime = MAX_VALIDITY_PERIOD_VALUE;

下载文档原格式

  / 6