mt2503在短信option菜单中选择use number时提取出发件人的号码
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
如何在短信option菜单中选择usenumber时,可以提取出发件人的号码
[SOLUTION]
09A版本:(修改的地方以__use_number__为标记)
voidMMI_SMS_pre_entry_use_detail_list_ext(mmi_msg_addr_type_enumtype,S8*pText,U16txtlen,S8*address)
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
U16string_id;
#ifdef__use_number__
U8*addr;
S8*number=(S8*)OslMalloc(MAX_DIGITS_SMS*ENCODING_LENGTH);
#endif
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS_OPTIONS);
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS);
g_sms_addr.addr_type=type;
#ifndef__use_number__
addr=mmi_sms_get_msg_address(g_sms_cntx.curr_msg_index);
mmi_asc_n_to_ucs2(number,(S8*)addr,MAX_DIGITS_SMS);
mmi_sms_get_addr_list_fROM_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,number);
OslMfree(number);
#else
mmi_sms_get_addr_list_from_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,address);
#endif
if(g_sms_addr.addr_num>0)
{
mmi_sms_entry_use_detail_list();
}
else
{
string_id=mmi_sms_get_no_addr_notify_string(type);
mmi_display_popup(
(UI_string_type)GetString(string_id),
MMI_EVENT_FAILURE);
}
}
09B版本:(修改的地方以__use_number__为标记)
voidmmi_sms_pre_entry_use_detail_list_ext(mmi_msg_addr_type_enumtype,S8*pText,U16txtlen,S8*address)
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
U16string_id;
#ifdef__use_number__
U8*addr;
S8*number=(S8*)OslMalloc(MAX_DIGITS_SMS*ENCODING_LENGTH);
#endif
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS_OPTIONS);
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS);
g_sms_addr.addr_type=type;
#ifdef__use_number__
addr=mmi_sms_get_msg_address(g_sms_cntx.curr_msg_id);
mmi_asc_n_to_ucs2(number,(S8*)addr,MAX_DIGITS_SMS);
mmi_sms_get_addr_list_from_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,number);
OslMfree(number);
#else
mmi_sms_get_addr_list_from_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,address);
#endif
if(g_sms_addr.addr_num>0)
{
mmi_sms_entry_use_detail_list();
}
else
{
string_id=mmi_sms_get_no_addr_notify_string(type);
mmi_display_popup(
(UI_string_type)GetString(string_id),
MMI_EVENT_FAILURE);
}
}
无论是09A还是09B的版本,请记得在smsappmisc.c加入如下声明:
externU8*mmi_sms_get_msg_address(U16msg_index);否则编译器会报错。
如何在短信option菜单中选择usenumber时,可以提取出发件人的号码
[SOLUTION]
09A版本:(修改的地方以__use_number__为标记)
voidMMI_SMS_pre_entry_use_detail_list_ext(mmi_msg_addr_type_enumtype,S8*pText,U16txtlen,S8*address)
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
U16string_id;
#ifdef__use_number__
U8*addr;
S8*number=(S8*)OslMalloc(MAX_DIGITS_SMS*ENCODING_LENGTH);
#endif
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS_OPTIONS);
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS);
g_sms_addr.addr_type=type;
#ifndef__use_number__
addr=mmi_sms_get_msg_address(g_sms_cntx.curr_msg_index);
mmi_asc_n_to_ucs2(number,(S8*)addr,MAX_DIGITS_SMS);
mmi_sms_get_addr_list_fROM_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,number);
OslMfree(number);
#else
mmi_sms_get_addr_list_from_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,address);
#endif
if(g_sms_addr.addr_num>0)
{
mmi_sms_entry_use_detail_list();
}
else
{
string_id=mmi_sms_get_no_addr_notify_string(type);
mmi_display_popup(
(UI_string_type)GetString(string_id),
MMI_EVENT_FAILURE);
}
}
09B版本:(修改的地方以__use_number__为标记)
voidmmi_sms_pre_entry_use_detail_list_ext(mmi_msg_addr_type_enumtype,S8*pText,U16txtlen,S8*address)
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
U16string_id;
#ifdef__use_number__
U8*addr;
S8*number=(S8*)OslMalloc(MAX_DIGITS_SMS*ENCODING_LENGTH);
#endif
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS_OPTIONS);
DeleteScreenIfPresent(SCR_ID_SMS_USE_ADDRESS);
g_sms_addr.addr_type=type;
#ifdef__use_number__
addr=mmi_sms_get_msg_address(g_sms_cntx.curr_msg_id);
mmi_asc_n_to_ucs2(number,(S8*)addr,MAX_DIGITS_SMS);
mmi_sms_get_addr_list_from_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,number);
OslMfree(number);
#else
mmi_sms_get_addr_list_from_msgtxt((S8*)pText,txtlen,(U8)g_sms_addr.addr_type,address);
#endif
if(g_sms_addr.addr_num>0)
{
mmi_sms_entry_use_detail_list();
}
else
{
string_id=mmi_sms_get_no_addr_notify_string(type);
mmi_display_popup(
(UI_string_type)GetString(string_id),
MMI_EVENT_FAILURE);
}
}
无论是09A还是09B的版本,请记得在smsappmisc.c加入如下声明:
externU8*mmi_sms_get_msg_address(U16msg_index);否则编译器会报错。