/************************************************************** FUNCTION NAME : SendCallBarrActivate(void) PURPOSE : function to send req for call barring activate INPUT PARAMETERS : nil OUTPUT PARAMETERS : nil RETURNS : void **************************************************************/ void SendCallBarrActivate(void) { S8 input_string[(MAX_DIGITS_USSD * ENCODING_LENGTH)]; PS8 hash_string = NULL ; S8 string_out[20]; memset(string_out,0,20); memset(input_string,0, (MAX_DIGITS_USSD * ENCODING_LENGTH)); hash_string = (PS8) GetString(STR_HASH_VALUE); switch(g_callset_cntx_p->SSBarType) { /* incase of call barring all outgoing calls */ case BARRING_OUTGOING_ALLCALLS: strcpy((S8*) string_out, "*33*"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_out); break; /* incase of call barring all outgoing international calls */ case BARRING_OUTGOING_INTERCALL : strcpy((S8*) string_out, "*331*"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_out); break; /* incase of call barring all outgoing international calls expect home */ case BARRING_OUTGOING_INTEREXCEPTHOME : strcpy((S8*) string_out, "*332*"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_out); break; /* incase of call barring all incoming calls */ case BARRING_INCOMING_ALLCALLS : strcpy((S8*) string_out, "*35*"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_out); break; /* incase of call barring all incoming roaming calls */ case BARRING_INCOMING_ROAMING : strcpy((S8*) string_out, "*351*"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_out); break; } pfnUnicodeStrcat((PS8) input_string,(PS8) g_callset_cntx_p->SSBarPassOld); pfnUnicodeStrcat((PS8) input_string,(PS8) hash_string); /* set protocol event handler for the call barring response */ #ifdef __MMI_MULTI_SIM__ MTPNP_CallSetSetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP); #else SetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP); #endif #ifdef __MMI_MULTI_SIM__ MTPNP_AD_Set_Channel(MTPNP_AD_CALL_CHANNEL, g_callset_cntx_p->nSimId); #endif /* make a corresponding ss string for call barring option */ MakeCall((PS8) input_string); return; }
void EmPingInitInlinParam(void) { AnsiiToUnicodeString((S8*)gEmPingIP1,(S8*)"255"); AnsiiToUnicodeString((S8*)gEmPingIP2,(S8*)"255"); AnsiiToUnicodeString((S8*)gEmPingIP3,(S8*)"255"); AnsiiToUnicodeString((S8*)gEmPingIP4,(S8*)"255"); memset(gEmPingSize, 0, sizeof(gEmPingSize) ); memset(gEmPingCount, 0, sizeof(gEmPingCount) ); memset(gEmPingTimeout, 0, sizeof(gEmPingTimeout) ); }
/************************************************************** FUNCTION NAME : SendBarrQuery(void) PURPOSE : function to send req for call barring query status. INPUT PARAMETERS : nil OUTPUT PARAMETERS : nil RETURNS : void **************************************************************/ void SendBarrQuery(void) { S8 input_string[(MAX_DIGITS_USSD * ENCODING_LENGTH)]; S8 string_type[30]; memset(input_string,0,( MAX_DIGITS_USSD * ENCODING_LENGTH)); memset(string_type,0,30); switch(g_callset_cntx_p->SSBarType) { /* incase of call barring all outgoing calls */ case BARRING_OUTGOING_ALLCALLS: strcpy((S8*) string_type, "*#33#"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_type); break; /* incase of call barring all outgoing international calls */ case BARRING_OUTGOING_INTERCALL : strcpy((S8*) string_type, "*#331#"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_type); break; /* incase of call barring all outgoing international calls expect home */ case BARRING_OUTGOING_INTEREXCEPTHOME : strcpy((S8*)string_type, "*#332#"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_type); break; /* incase of call barring all incoming calls */ case BARRING_INCOMING_ALLCALLS : strcpy((S8*) string_type, "*#35#"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_type); break; /* incase of call barring all incoming roaming calls */ case BARRING_INCOMING_ROAMING : strcpy((S8*) string_type, "*#351#"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_type); break; } /* set protocol event handler for the call barring response */ #ifdef __MMI_MULTI_SIM__ MTPNP_CallSetSetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP); #else SetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP); #endif #ifdef __MMI_MULTI_SIM__ MTPNP_AD_Set_Channel(MTPNP_AD_CALL_CHANNEL, g_callset_cntx_p->nSimId); #endif /* make a corresponding ss string for call barring option */ MakeCall((PS8) input_string); return; }
/***************************************************************************** FUNCTION NAME : SP_Entry_Make_Call PURPOSE :when the sp service is IVR, question call or don't call. INPUT PARAMETERS : void OUTPUT PARAMETERS : void RETURNS : ******************************************************************************/ void SP_Entry_Make_Call (void) { S8 textbuf[SP_CODE_LENGTH*ENCODING_LENGTH]; SP_SMS_Service_Code_Struct sp_level2_service_code; mmi_trace(g_sw_SP,"niej SP_Entry_Make_Call"); SP_Get_Level2_Service_Code(sp_level1_scr.sp_menu_id, sp_level1_scr.sp_menu_id+sp_level_2_index+1, &sp_level2_service_code); EntryNewScreen(SCR_ID_MSG_CONFIRMATION, Sp_Exit_Make_Call, NULL, NULL); memset(textbuf, 0, SP_CODE_LENGTH*ENCODING_LENGTH); memset(g_msg_cntx.smsPhoneNumber, 0, (MAX_DIGITS+1)*ENCODING_LENGTH); AnsiiToUnicodeString(textbuf, (S8*)sp_level2_service_code.Code_Subscribe); mmi_trace(g_sw_SP, "niej Code_Subscribe[%s]", sp_level2_service_code.Code_Subscribe); pfnUnicodeStrcpy(g_msg_cntx.smsPhoneNumber, textbuf); mmi_trace(1, "g_msg_cntx.smsPhoneNumber[%s]", g_msg_cntx.smsPhoneNumber); ShowCategory154Screen(0, 0, STR_GLOBAL_YES, IMG_SMS_COMMON_NOIMAGE, STR_GLOBAL_NO, IMG_SMS_COMMON_NOIMAGE, (PU8)get_string_lang (STR_GLOBAL_DIAL, SSC_SCHINESE), (PU8)g_msg_cntx.smsPhoneNumber, IMG_GLOBAL_QUESTION, NULL); SetLeftSoftkeyFunction (Sp_Make_Call, KEY_EVENT_UP); SetRightSoftkeyFunction (GoBackHistory, KEY_EVENT_UP); playRequestedTone(WARNING_TONE); }
/** * @brief 浏览并选择一个文件以供之后打开 * @param aBuffer - 接受文件名的缓冲 * @param aMaxSize - 缓冲以字符为单位的大小,含0结尾 * @param abOpenFile - 是否是打开文件还是保存文件 * @param aFilter - 过滤字符串,格式为"*.aaa;*.bbb",如果为SFNull表示"*.*" * @param aReason - 异步调用的通知结果的存放地址,调用后应当设为SF_REASON_BUSY,然后在系统处理完后设置实际的处理结果,成功的话设为SF_REASON_OK * @remarks 这是一个异步调用,调用后将在之后控制权交还系统时离开本应用进入系统的打开界面,之后回到应用再设置结果。 */ void SFSystem_SelectFile(UChar* aBuffer,SFSize_T aMaxSize,SFBool bOpenFile,const UChar* aFilter,SFReason* aReason) { if(bOpenFile) { AnsiiToUnicodeString((S8 *)aBuffer,(S8 *)"d:\\demo.nes"); * aReason = SF_REASON_OK; } }
/***************************************************************************** * FUNCTION * SpofFillInlineEditStruct * DESCRIPTION * Initialize inline editor structure * PARAMETERS * None. * RETURNS * None. * GLOBALS AFFECTED * External global *****************************************************************************/ void SpofFillInlineEditStruct(void) { S8 dummyString[12]; /* initialize string resource for inline selection */ g_spof_cntx.ActStateList[0] = GetString(SPOF_DISABLE_STRINGID); g_spof_cntx.ActStateList[1] = GetString(SPOF_ENABLE_STRINGID); g_spof_cntx.OnOffStateList[0] = GetString(STR_MENU_SETTING_SCH_POW_SET1_POW_ON); g_spof_cntx.OnOffStateList[1] = GetString(STR_MENU_SETTING_SCH_POW_SET1_POW_OFF); g_spof_cntx.CurrHiliteOnOff = g_spof_cntx.SPOFList[g_spof_cntx.CurrItem].Type; g_spof_cntx.CurrHiliteActivation= g_spof_cntx.SPOFList[g_spof_cntx.CurrItem].Status; /* hour buffer */ sprintf(dummyString,"%02d",g_spof_cntx.SPOFList[g_spof_cntx.CurrItem].Hour); AnsiiToUnicodeString(g_spof_cntx.HourBuf,dummyString); /* minute buffer */ sprintf(dummyString,"%02d",g_spof_cntx.SPOFList[g_spof_cntx.CurrItem].Min); AnsiiToUnicodeString(g_spof_cntx.MinBuf,dummyString); /* caption */ SetInlineItemCaption(&wgui_inline_items[0],(PU8)GetString(SPOF_STATUS_STRINGID)); /* activate/inactivate */ SetInlineItemActivation(&wgui_inline_items[1],INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT,0); SetInlineItemSelect(&wgui_inline_items[1],SPOF_NUM_STATES_ACTINACT,(U8**)g_spof_cntx.ActStateList,&g_spof_cntx.CurrHiliteActivation); /* power on/off */ SetInlineItemActivation(&wgui_inline_items[2],INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT,0); DisableInlineItemHighlight(&wgui_inline_items[2]); SetInlineItemSelect(&wgui_inline_items[2],SPOF_NUM_STATES_ONOFF,(U8**)g_spof_cntx.OnOffStateList,&g_spof_cntx.CurrHiliteOnOff); /* time */ SetInlineItemActivation(&wgui_inline_items[3],INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT,0); SetInlineItemTime(&wgui_inline_items[3],(U8*)g_spof_cntx.HourBuf,(U8*)g_spof_cntx.MinBuf,NULL,AlmTimeEditorCallBack/*SOPFTimeEditorCallBack*/); DisableInlineItemHighlight(&wgui_inline_items[3]); }
void EmPingPreparedIPAddressString(U8* string_buffer,U8 *IP1,U8 *IP2,U8 *IP3,U8 *IP4) { U8 Point[4]; AnsiiToUnicodeString((S8*)Point,(S8*)"."); pfnUnicodeStrcpy((PS8)string_buffer,(PS8)IP1); pfnUnicodeStrcat((PS8)string_buffer,(PS8)Point); pfnUnicodeStrcat((PS8)string_buffer,(PS8)IP2); pfnUnicodeStrcat((PS8)string_buffer,(PS8)Point); pfnUnicodeStrcat((PS8)string_buffer,(PS8)IP3); pfnUnicodeStrcat((PS8)string_buffer,(PS8)Point); pfnUnicodeStrcat((PS8)string_buffer,(PS8)IP4); }
/************************************************************** FUNCTION NAME : SendChangePswdReq(void ) PURPOSE : function for sending req for call barring change passwd. INPUT PARAMETERS : nil OUTPUT PARAMETERS : nil RETURNS : void **************************************************************/ void SendChangePswdReq(void) { U8 input_string[MAX_DIGITS_USSD]; U8 string_type[20]; PS8 hash_string = NULL ; U8 uni_string[10]; memset(uni_string,0,10); /* format the string for the ss string handling */ memset(input_string,0, MAX_DIGITS_USSD); memset(string_type,0,20); strcpy((PS8) string_type,(PS8)"*03**"); hash_string = (PS8) GetString(STR_HASH_VALUE); AnsiiToUnicodeString((PS8) input_string,(PS8)string_type); pfnUnicodeStrcat((PS8) input_string,(PS8) g_callset_cntx_p->SSBarPassOld); strcpy((PS8) string_type,(PS8) "*"); AnsiiToUnicodeString((PS8) uni_string,(PS8)string_type); pfnUnicodeStrcat((PS8) input_string,(PS8) uni_string); pfnUnicodeStrcat((PS8) input_string,(PS8) g_callset_cntx_p->SSBarPassNew); pfnUnicodeStrcat((PS8) input_string,(PS8) uni_string); pfnUnicodeStrcat((PS8) input_string,(PS8) g_callset_cntx_p->SSBarPassCfrm); pfnUnicodeStrcat((PS8) input_string,(PS8) hash_string); /* set protocol event handler for the call barring passwd change response */ #ifdef __MMI_MULTI_SIM__ MTPNP_CallSetSetProtocolEventHandler(CALLSETBarringPassRsp, PRT_MMI_SS_CHANGE_PASSWORD_RSP); #else SetProtocolEventHandler(CALLSETBarringPassRsp, PRT_MMI_SS_CHANGE_PASSWORD_RSP); #endif #ifdef __MMI_MULTI_SIM__ MTPNP_AD_Set_Channel(MTPNP_AD_CALL_CHANNEL, g_callset_cntx_p->nSimId); #endif /* make a corresponding ss string for call barring passwd change response option */ MakeCall((PS8) input_string); return; }
/************************************************************** FUNCTION NAME : SendChangePswdReq(void ) PURPOSE : function for sending req for cancel all (call barring) . INPUT PARAMETERS : nil OUTPUT PARAMETERS : nil RETURNS : void **************************************************************/ void SendCancelAllReq(void) { U8 input_string[MAX_DIGITS_USSD]; PS8 hash_string = NULL ; U8 string_type[20]; /* format the string for the ss string handling */ memset(input_string,0, MAX_DIGITS_USSD); memset(string_type,0,20); hash_string= (PS8) GetString(STR_HASH_VALUE); strcpy((PS8) string_type,(PS8)"#330*"); AnsiiToUnicodeString((PS8) input_string,(PS8)string_type); pfnUnicodeStrcat((S8*) input_string,(S8*) g_callset_cntx_p->SSBarPassOld); pfnUnicodeStrcat((S8*) input_string,(S8*) hash_string); #ifdef __MMI_MULTI_SIM__ MTPNP_AD_Set_Channel(MTPNP_AD_CALL_CHANNEL, g_callset_cntx_p->nSimId); #endif /* make a corresponding ss string for call fwd option */ MakeCall((PS8) input_string); return; }
//added by guojian :get the fdn list to gFDLBDLContext, not PhoneBook[]. for our fdn process, not the same with previous one void GetFDLToContext(void *info) { MSG_PHB_GET_ENTRY_BY_INDEX_RSP_STRUCT* localPtr; U8 i= 0,j=0; //micha0317 U8 TempBuff[(MAX_PB_NUMBER_LENGTH+2)*ENCODING_LENGTH]; U8 *tmpConvertBuf = NULL; U16 convertOutLen = 0; U8 name_dcs;//Renwy add 2008/06/25 for '$' error U8 nSimId = 0; #ifdef __MMI_MULTI_SIM__ nSimId = gSecSetupMenuSimID; #endif mmi_trace(1, TSTXT("GetFDLToContext")); localPtr = (MSG_PHB_GET_ENTRY_BY_INDEX_RSP_STRUCT *)info; if (localPtr->result.flag == 0 /*OK*/) { mmi_trace(1, TSTXT("if GetFDLToContext (localPtr->result.flag == 0 /*OK*/) ")); i = gFDLBDLContext[nSimId].FDNBDNCount; gFDLBDLContext[nSimId].FDNBDNCount = localPtr->no_list; //Add number of new entries in current list length. mmi_trace(TRUE," Func: %s gpFDLBDLContext->FDNBDNCount=%d", __FUNCTION__,gFDLBDLContext[nSimId].FDNBDNCount); if (gFDLBDLContext[nSimId].FDNBDNCount > MAX_SIM_ENTRIES) gFDLBDLContext[nSimId].FDNBDNCount = MAX_SIM_ENTRIES; for (; i < gFDLBDLContext[nSimId].FDNBDNCount; i++, j++) { gFDLBDLContext[nSimId].FDLBDLEntries[i].storage = localPtr->list[j].storage; gFDLBDLContext[nSimId].FDLBDLEntries[i].index = localPtr->list[j].index; gFDLBDLContext[nSimId].FDLBDLEntries[i].record_index = localPtr->list[j].record_index; memset(gFDLBDLContext[nSimId].FDLBDLEntries[i].alpha_id.name, 0, MAX_NAME_LEN_FSB_LIST*ENCODING_LENGTH); memset(gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.number, 0, MAX_NUMBER_LEN_FSB_LIST*ENCODING_LENGTH); gFDLBDLContext[nSimId].FDLBDLEntries[i].alpha_id.name_length = localPtr->list[j].alpha_id.name_length; gFDLBDLContext[nSimId].FDLBDLEntries[i].alpha_id.name_dcs = localPtr->list[j].alpha_id.name_dcs; {//Renwy add begine 2008/06/25 for '$' error name_dcs = gFDLBDLContext[0].FDLBDLEntries[i].alpha_id.name_dcs; if (MMI_PHB_ASCII == gFDLBDLContext[0].FDLBDLEntries[i].alpha_id.name_dcs) { name_dcs = MMI_8BIT_DCS; } }//Renwy add end 2008/06/25 for '$' error tmpConvertBuf = CovertStringForPlatform(localPtr->list[j].alpha_id.name, gFDLBDLContext[nSimId].FDLBDLEntries[i].alpha_id.name_length,name_dcs,&convertOutLen);//Renwy modify 2008/06/25 //tmpConvertBuf = CovertStringForPlatform(localPtr->list[j].alpha_id.name, gFDLBDLContext.FDLBDLEntries[i].alpha_id.name_length,gFDLBDLContext.FDLBDLEntries[i].alpha_id.name_dcs,&convertOutLen); gFDLBDLContext[nSimId].FDLBDLEntries[i].alpha_id.name_length = (U8) convertOutLen; if (pfnUnicodeStrlen((PS8) tmpConvertBuf) <= MAX_PB_NAME_LENGTH) { pfnUnicodeStrcpy((PS8) gFDLBDLContext[nSimId].FDLBDLEntries[i].alpha_id.name, (PS8) tmpConvertBuf); } else { pfnUnicodeStrncpy((PS8) gFDLBDLContext[nSimId].FDLBDLEntries[i].alpha_id.name, (PS8) tmpConvertBuf, MAX_PB_NAME_LENGTH); } if (tmpConvertBuf!=NULL) OslMfree(tmpConvertBuf); if (localPtr->list[j].tel.type == MMI_CSMCC_INTERNATIONAL_ADDR) { gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.type = localPtr->list[j].tel.type; gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.number[0] = '+';//insert '+' before the number. gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.length = localPtr->list[j].tel.length; AnsiiToUnicodeString((PS8)TempBuff, (PS8)localPtr->list[j].tel.number); memcpy(gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.number + ENCODING_LENGTH, TempBuff, (localPtr->list[j].tel.length)*ENCODING_LENGTH); } else { gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.type = localPtr->list[j].tel.type; gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.length = localPtr->list[j].tel.length; AnsiiToUnicodeString((PS8)TempBuff, (PS8)localPtr->list[j].tel.number); memcpy(gFDLBDLContext[nSimId].FDLBDLEntries[i].tel.number, (PS8)TempBuff, (localPtr->list[j].tel.length)*ENCODING_LENGTH); } } } }
/************************************************************** FUNCTION NAME : SECSETGetFdlEntriesRsp(void) PURPOSE : getting all entries rsp INPUT PARAMETERS : nil OUTPUT PARAMETERS : nil RETURNS : void Author : Vanita Jain **************************************************************/ void SECSETGetFdlEntriesRsp(void *info) { MSG_PHB_GET_ENTRY_BY_INDEX_RSP_STRUCT* localPtr; U8 i= 0,j=0; //micha0317 U8 TempBuff[(MAX_PB_NUMBER_LENGTH+2)*ENCODING_LENGTH]; U8 *tmpConvertBuf = NULL; U16 convertOutLen = 0; U8 name_dcs;//Renwy add 2008/06/25 for '$' error U8 nSimID; nSimID = MTPNP_AD_get_protocol_event_src_mode(); mmi_trace(1, TSTXT("SECSETGetFdlEntriesRsp")); SetProtocolEventHandlerExt(NULL, PRT_PHB_GET_ENTRY_BY_INDEX_RSP,nSimID); localPtr = (MSG_PHB_GET_ENTRY_BY_INDEX_RSP_STRUCT *)info; if (localPtr->result.flag == 0 /*OK*/) { mmi_trace(1, TSTXT("if (localPtr->result.flag == 0 /*OK*/) ")); i = gpFDLBDLContext->FDNBDNCount; gpFDLBDLContext->FDNBDNCount += localPtr->no_list; //Add number of new entries in current list length. if (gpFDLBDLContext->FDNBDNCount > MAX_SIM_ENTRIES) gpFDLBDLContext->FDNBDNCount = MAX_SIM_ENTRIES; for (; i < gpFDLBDLContext->FDNBDNCount; i++, j++) { gpFDLBDLContext->FDLBDLEntries[i].storage = localPtr->list[j].storage; gpFDLBDLContext->FDLBDLEntries[i].index = localPtr->list[j].index; gpFDLBDLContext->FDLBDLEntries[i].record_index = localPtr->list[j].record_index; memset(gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name, 0, MAX_NAME_LEN_FSB_LIST*ENCODING_LENGTH); memset(gpFDLBDLContext->FDLBDLEntries[i].tel.number, 0, MAX_NUMBER_LEN_FSB_LIST*ENCODING_LENGTH); gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name_length = localPtr->list[j].alpha_id.name_length; gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name_dcs = localPtr->list[j].alpha_id.name_dcs; {//Renwy add begine 2008/06/25 for '$' error name_dcs = gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name_dcs; if (MMI_PHB_ASCII == gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name_dcs) { name_dcs = MMI_8BIT_DCS; } }//Renwy add end 2008/06/25 for '$' error tmpConvertBuf = CovertStringForPlatform(localPtr->list[j].alpha_id.name, gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name_length,name_dcs,&convertOutLen);//Renwy modify 2008/06/25 //tmpConvertBuf = CovertStringForPlatform(localPtr->list[j].alpha_id.name, gFDLBDLContext.FDLBDLEntries[i].alpha_id.name_length,gFDLBDLContext.FDLBDLEntries[i].alpha_id.name_dcs,&convertOutLen); gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name_length = (U8) convertOutLen; if (pfnUnicodeStrlen((PS8) tmpConvertBuf) <= MAX_PB_NAME_LENGTH) { pfnUnicodeStrcpy((PS8) gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name, (PS8) tmpConvertBuf); } else { pfnUnicodeStrncpy((PS8) gpFDLBDLContext->FDLBDLEntries[i].alpha_id.name, (PS8) tmpConvertBuf, MAX_PB_NAME_LENGTH); } if (tmpConvertBuf!=NULL) OslMfree(tmpConvertBuf); if (localPtr->list[j].tel.type == MMI_CSMCC_INTERNATIONAL_ADDR) { gpFDLBDLContext->FDLBDLEntries[i].tel.type = localPtr->list[j].tel.type; gpFDLBDLContext->FDLBDLEntries[i].tel.number[0] = '+';//insert '+' before the number. gpFDLBDLContext->FDLBDLEntries[i].tel.length = localPtr->list[j].tel.length; AnsiiToUnicodeString((PS8)TempBuff, (PS8)localPtr->list[j].tel.number); memcpy(gpFDLBDLContext->FDLBDLEntries[i].tel.number + ENCODING_LENGTH, TempBuff, (localPtr->list[j].tel.length)*ENCODING_LENGTH); } else { gpFDLBDLContext->FDLBDLEntries[i].tel.type = localPtr->list[j].tel.type; gpFDLBDLContext->FDLBDLEntries[i].tel.length = localPtr->list[j].tel.length; AnsiiToUnicodeString((PS8)TempBuff, (PS8)localPtr->list[j].tel.number); memcpy(gpFDLBDLContext->FDLBDLEntries[i].tel.number, (PS8)TempBuff, (localPtr->list[j].tel.length)*ENCODING_LENGTH); } } if (localPtr->no_list == MAX_ENTRIES_IN_LIST) { mmi_trace(1, TSTXT(" if (localPtr->no_list == MAX_ENTRIES_IN_LIST) ")); SECSETGetFdlEntriesReq(); } else { mmi_trace(1, TSTXT(" ViewFDList ")); if(g_FixedInit[nSimID] != TRUE)////man for fdn { ViewFDList(); } gSimReady[nSimID] = TRUE; /* * Retrieve FDN list to ADN buffer when FDN is enable. * Because ADN will not read when FDN is on, so use ADN's buffer to store FDN temporarily * This is for call lookup FDN number usage. */ // if(g_SecuritySetupContext.FdlStatus) // mmi_phb_fdn_get_list_to_ram(); } } else if (localPtr->result.flag == 1 && localPtr->result.cause == 5) { // gFDLBDLContext.FDNBDNCount = 0; gSimReady[nSimID] = TRUE; ViewFDList(); } else { DisplayPopup((PU8)GetString(STR_GLOBAL_UNFINISHED) ,IMG_GLOBAL_UNFINISHED, 1,ST_NOTIFYDURATION,ERROR_TONE); DeleteUptoScrID(SCR_ID_SECSET_FIX_DIAL); } }
void EntryBMIResultScreen(void) { //add by zough 061121 start U8 *guiBuffer; S8 calculatestr[OPERATOR_LEN+1]; S8 resultstr[OPERATOR_LEN+1]; S8 LBstr[OPERATOR_LEN+1]; S8 UBstr[OPERATOR_LEN+1]; CALOPERATOR_STRUCT LBValue; CALOPERATOR_STRUCT UBValue; CALOPERATOR_STRUCT calculate; CALOPERATOR_STRUCT result; U8 *bmiBuf; U8 percentageValue; U16 FolwerIndex; U8 LB, UB; S8 UnDispLen; memset(calculatestr, 0, OPERATOR_LEN+1); memset(resultstr, 0, OPERATOR_LEN+1); RateToStr(resultstr, &g_bmi_cntx->Weight); StrToRate(&result, resultstr); memset(&calculatestr, 0, OPERATOR_LEN+1); *calculatestr = '1'; *(calculatestr + 1) = '0'; *(calculatestr + 2) = '0'; *(calculatestr + 3) = '0'; *(calculatestr + 4) = '0'; StrToRate(&calculate, calculatestr); CalculatorMult(&result, &calculate); memset(g_bmi_cntx->ResultBuf, 0, sizeof(g_bmi_cntx->ResultBuf)); guiBuffer = GetCurrGuiBuffer(SCR_BMI_RESULT); EntryNewScreen(SCR_BMI_RESULT, NULL, EntryBMIResultScreen, NULL); memset(&calculatestr, 0, OPERATOR_LEN+1); RateToStr(calculatestr, &g_bmi_cntx->Height); StrToRate(&calculate, calculatestr); CalculatorDivi(&result, &calculate); memset(&calculatestr, 0, OPERATOR_LEN+1); RateToStr(calculatestr, &g_bmi_cntx->Height); StrToRate(&calculate, calculatestr); CalculatorDivi(&result, &calculate); RateToStr(resultstr, &result); //add by zough 061207 start if ((OPERATOR_LEN - 6) > 0) { for (UnDispLen = 6; UnDispLen <= OPERATOR_LEN; UnDispLen++) { *(resultstr + UnDispLen) = '\0'; } } //add by zough 061207 end // *(resultstr + OPERATOR_LEN) = '\0'; // *(resultstr + OPERATOR_LEN-1) = '\0'; AnsiiToUnicodeString((S8*)&g_bmi_cntx->ResultBuf, resultstr); if (g_bmi_cntx->Gender == 0) { LB = BMI_MALE_LB; UB = BMI_MALE_UB; FolwerIndex = IMG_BMI_BLUE_FLOWER; } else { LB = BMI_FEMALE_LB; UB = BMI_FEMALE_UB; FolwerIndex = IMG_BMI_RED_FLOWER; } coolsand_UI_itoa(LB, (U16*)g_bmi_cntx->LBBuf, 10); coolsand_UI_itoa(UB, (U16*)g_bmi_cntx->UBBuf, 10); UnicodeToAnsii(LBstr, g_bmi_cntx->LBBuf); UnicodeToAnsii(UBstr, g_bmi_cntx->UBBuf); StrToRate(&UBValue, UBstr); StrToRate(&LBValue, LBstr); if (CompFloat(&result, &UBValue) > 0) { bmiBuf = (U8*) GetString(STR_BMI_FAT); percentageValue = 2; } else if (CompFloat(&result, &LBValue) < 0) { bmiBuf = (U8*) GetString(STR_BMI_THIN); percentageValue = 0; } else { bmiBuf = (U8*) GetString(STR_BMI_NORMAL); percentageValue = 1; } ShowCategory122Screen(STR_BMI_RESULT_CAPTION, GetRootTitleIcon(ORGANIZER_HEALTH_MENU), 0, 0, STR_GLOBAL_BACK, IMG_GLOBAL_BACK, STR_BMI_BMI_TEXT, percentageValue, guiBuffer, g_bmi_cntx->ResultBuf, bmiBuf, FolwerIndex, (U8*)g_bmi_cntx->LBBuf, (U8*)g_bmi_cntx->UBBuf); SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP); //add by zough 061121 end }
/***************************************************************************** FUNCTION NAME : Entry_SP_Msg_Service PURPOSE :From Mobile Paradise back to the previous screen. INPUT PARAMETERS : void OUTPUT PARAMETERS : void RETURNS : Entry_MobileEden Entry_SP_Level1 SP_Pre_Entry_Level2 Entry_SP_Msg_Service | | | | | /Level1/ | /Level2/ | | Mobile Paradise | | | | | | ->New Style World | | | ---->Joke | -------->Request | -------------> ... <----- <----- SP_EDEN_GoBackHistory SP_Level1_GoBackHistory ******************************************************************************/ void Entry_SP_Msg_Service (void) { S8 textbuf[SP_CODE_LENGTH*ENCODING_LENGTH]; EMSData* pEMS; byte result; history_t temphistory; U8 service = sp_level_3_service_index; S8 codeNum[SP_LONG_CODE_LENGTH]; S8 dest_number[12]= "10664321";//now only china Mobile has SP, the destination number is only one. SP_SMS_Service_Code_Struct sp_level2_service_code; int i=0; mmi_trace(g_sw_SP,"niej service[%d]", service); /****************phone number********************/ memset(textbuf, 0, SP_CODE_LENGTH*ENCODING_LENGTH); memset(g_msg_cntx.smsPhoneNumber, 0, (MAX_DIGITS+1)*ENCODING_LENGTH); AnsiiToUnicodeString((S8*)textbuf, (S8*)dest_number); pfnUnicodeStrcat(g_msg_cntx.smsPhoneNumber, textbuf); mmi_trace(g_sw_SP,"niej 1textbuf[%s]", textbuf); mmi_trace(g_sw_SP,"niej g_msg_cntx.smsPhoneNumber[%s]", g_msg_cntx.smsPhoneNumber); /*Service code*/ ReleaseEMSEditBuffer(); memset(textbuf, 0, SP_CODE_LENGTH*ENCODING_LENGTH); memset(codeNum, 0, SP_LONG_CODE_LENGTH-1); SP_Get_Level2_Service_Code(sp_level1_scr.sp_menu_id, sp_level1_scr.sp_menu_id+sp_level_2_index+1, &sp_level2_service_code); switch(service) { case SP_SERVICE_SUBSCRIBE: memcpy(codeNum, sp_level2_service_code.Code_Subscribe, SP_LONG_CODE_LENGTH-1); break; case SP_SERVICE_ORDER: memcpy(codeNum, sp_level2_service_code.Code_Order, SP_LONG_CODE_LENGTH-1); break; case SP_SERVICE_COST: if((MENU_ID_SP_NEW_WORLD_THUMB_FUN == sp_level2_service_code.Level2_Menu_Id) ||(MENU_ID_SP_NEW_WORLD_CHALLENGER == sp_level2_service_code.Level2_Menu_Id) ||(MENU_ID_SP_FUN_EVERYDAY_JOY_TEST == sp_level2_service_code.Level2_Menu_Id) ||(MENU_ID_SP_FUN_EVERYDAY_SWEET_WORD == sp_level2_service_code.Level2_Menu_Id) ||(MENU_ID_SP_FUN_EVERYDAY_GUESS_WIN == sp_level2_service_code.Level2_Menu_Id) ) { int len = strlen(sp_level2_service_code.Code_Cost); int strid = 0; for(; i<len; i++) { strid += (sp_level2_service_code.Code_Cost[i]-48)*N_Multiplication(10, (len-i-1)); } mmi_trace(g_sw_SP,"niej strid[%d]",strid); Sp_Entry_Explain_Screen(strid);//43519 is id of title in next screen(Price Explanation) return; } else { memcpy(codeNum, sp_level2_service_code.Code_Cost, SP_LONG_CODE_LENGTH-1); } break; case SP_SERVICE_CANCEL: memcpy(codeNum, sp_level2_service_code.Code_Order, SP_LONG_CODE_LENGTH-1); break; case SP_SERVICE_EXPLAIN: Sp_Entry_Explain_Screen(sp_level2_service_code.Explain_StrId);//43520 is id of title in next screen(Description) return; case SP_SERVICE_CUSTOMER: SP_Entry_Make_Call(); return; default: mmi_trace(g_sw_SP,"niej invalid service[%d]", service); return; } mmi_trace(g_sw_SP,"niej codeNum[%s]",codeNum); memset(textbuf, 0, SP_CODE_LENGTH*ENCODING_LENGTH); AnsiiToUnicodeString(textbuf, (S8*)codeNum); mmi_trace(g_sw_SP,"niej 2textbuf[%s]",textbuf); memset (& temphistory, 0, sizeof (temphistory)); GetHistory (SCR_ID_MSG_WRITE, &temphistory); pEMS = GetEMSDataForEdit (0, 0); result = AppendEMSString_Ext(INPUT_TYPE_ALPHANUMERIC_SENTENCECASE, pEMS, (U8*)textbuf, SMSAL_DEFAULT_DCS, temphistory.guiBuffer ); mmi_trace(g_sw_SP,"niej result[%d]", result); if(result) { mmi_frm_sms_send_struct * sendData=OslMalloc(sizeof(mmi_frm_sms_send_struct)); memset((S8*)sendData, 0, sizeof(mmi_frm_sms_send_struct)); memset(sendData->number, 0, SP_MAX_DIGITS_SMS); if(pfnUnicodeStrlen((S8*)g_msg_cntx.smsPhoneNumber)) UnicodeToAnsii((S8*)sendData->number, (S8*)g_msg_cntx.smsPhoneNumber); mmi_trace(g_sw_SP,"niej sendData->number[%s]", sendData->number); mmi_frm_sms_send_sms(Sp_Send_Msg_Rsp, MOD_MMI, sendData); OslMfree(sendData); } else { DisplayPopup ((PU8)GetString (STR_SMS_DOES_NOT_SUPPORT), IMG_GLOBAL_UNFINISHED, 1, MESSAGES_POPUP_TIME_OUT, (U8)ERROR_TONE); } }