Ejemplo n.º 1
0
/**************************************************************

	FUNCTION NAME		: PreNewFdlEntryReq(void)
  	PURPOSE				: Goto Confirm Save screen.
	INPUT PARAMETERS	: nil
	OUTPUT PARAMETERS	: nil
	RETURNS				: void
  	Author				: Vanita Jain
 

**************************************************************/
void PreNewFdlEntryReq()
{
	if(!pfnUnicodeStrlen((PS8)gpFDLBDLContext->FDLBDLNumber) && !pfnUnicodeStrlen((PS8)gpFDLBDLContext->FDLBDLName))
	{
		GoBackHistory();
	}
	else
	{
		EntrySECSETFDNSaveConfirm();
	}
}
Ejemplo n.º 2
0
void Get_Expalin_Screen_Inputbuffer(U8* inputBuffer)
{
    mmi_trace(g_sw_SP, "niej void Get_Expalin_Screen_Inputbuffer");
    if(inputBuffer != NULL)
    {
        memset(inputBuffer,0,MAX_INPUT_BUFFER);
        memcpy(inputBuffer, MMI_multiline_inputbox.text,
               pfnUnicodeStrlen(MMI_multiline_inputbox.text)*ENCODING_LENGTH);

    }
}
Ejemplo n.º 3
0
/*****************************************************************************

	FUNCTION NAME		: Sp_Entry_Explain_Screen

  PURPOSE	:entry explain screen, give the product intruduction.
	INPUT PARAMETERS	: explain_str_id is the id of product introduction string.
	OUTPUT PARAMETERS	: void

	RETURNS				:

******************************************************************************/
void Sp_Entry_Explain_Screen(U16 explain_str_id)
{
    PS8 buffer;
    S32 bufferSize;
    U8* inputBuffer = NULL;
    mmi_trace(g_sw_SP,"niej Sp_Entry_Explain_Screen");
    EntryNewScreen(SCR_SP_EXPLAIN, Sp_Exit_Explain_Screen, NULL, NULL);

    inputBuffer = GetCurrInputBuffer(SCR_SP_EXPLAIN);
    if(inputBuffer == NULL)
    {

        buffer	= GetString(explain_str_id);
        bufferSize	= pfnUnicodeStrlen(buffer);
        ShowCategory74Screen( STR_EXPLAIN_TITLE,
                              MAIN_MENU_TITLE_FUNANDGAMES_ICON,
                              0, 0,
                              STR_GLOBAL_BACK,IMG_GLOBAL_BACK,
                              (PU8)buffer, bufferSize, NULL);
    }
    else
    {
        bufferSize = pfnUnicodeStrlen(inputBuffer);

        ShowCategory74Screen( STR_EXPLAIN_TITLE,
                              MAIN_MENU_TITLE_FUNANDGAMES_ICON,
                              0, 0,
                              STR_GLOBAL_BACK,IMG_GLOBAL_BACK,
                              (PU8)inputBuffer, bufferSize, NULL);
    }



    /* go back to game menu */
    SetKeyHandler(GoBackHistory,KEY_LEFT_ARROW,KEY_EVENT_DOWN);
    SetRightSoftkeyFunction(GoBackHistory,KEY_EVENT_UP);

}
Ejemplo n.º 4
0
SFSize_T SFApp_GetCommandLine(UChar* aBuffer,SFSize_T aSize)
{	
	SFSize_T realSize;
	
	realSize = pfnUnicodeStrlen((S8 *)u16_g_game_file_name);

	if(realSize >= aSize)
	{
		realSize = aSize - 1;
	}

	if(realSize > 0)
	{
		pfnUnicodeStrncpy((PS8)aBuffer, (PS8)u16_g_game_file_name,realSize);
		aBuffer[realSize + 1] = 0x0;		
	}

	return realSize;
}
Ejemplo n.º 5
0
void AudioPlayIMelodyFileWithId(U8 *file, U8 style, U16 nId)
{
	if(file)//!=NULL
	{
	MYQUEUE Message;
	mmi_eq_play_audio_by_name_req_struct *audioByNamePlayReq;
	if(pfnUnicodeStrlen((PS8)file)>MAX_MELODY_FILE_NAME) return;
	audioByNamePlayReq = OslConstructDataPtr(sizeof (mmi_eq_play_audio_by_name_req_struct));
	audioByNamePlayReq->style=style,
	audioByNamePlayReq->identifier=nId,
	
	pfnUnicodeStrcpy((PS8)audioByNamePlayReq->file_name,(PS8)file),
	Message.oslMsgId = PRT_EQ_PLAY_AUDIO_BY_NAME_REQ;	
    Message.oslDataPtr = (oslParaType *)audioByNamePlayReq;
    Message.oslPeerBuffPtr= NULL;
	Message.oslSrcId=MOD_MMI;
	Message.oslDestId=MOD_L4C;
	OslMsgSendExtQueue(&Message);
}

}
Ejemplo n.º 6
0
kal_int32 mmi_chset_text_to_ucs2( kal_uint8 *dest, kal_int32 dest_size, kal_uint8 *src )
{
	memcpy( dest, src, dest_size );
	return pfnUnicodeStrlen( (const S8*) dest );
}
Ejemplo n.º 7
0
/* 
 * We do not want to recompile WAP integration after MMI settings are changed.
 * As a result, we keep the code related to MMI settings here.
 *
 */

#ifdef MMI_ON_WIN32

#define __NEWSIMULATOR 
#include "mmi_features.h"
#include "stdc.h"
#include "l4dr1.h"
#include "mmi_data_types.h"

#include "wgui.h"   /* for ui_string_id_type */
#include "fmt_def.h"
#include "fmt_struct.h"
#include "fat_fs.h"
#include "conversions.h"
#include "time.h"
#include "aud_id3_parser.h"
#undef __NEWSIMULATOR 

#ifdef __MMI_FILE_MANAGER__
extern void fmgr_copy_rsp_hdlr(void *info);
extern void fmgr_delete_rsp_hdlr(void *info);
#endif

//void FS_Read(){};
//void FS_Seek(){};
void kal_assert_fail(char* expr, char* file, kal_uint32 line, kal_bool isext, kal_uint32 ex1, kal_uint32 ex2, kal_uint32 ex3){};
//void FS_GetFileSize(){};
//void FS_Open(){};
//void FS_Close(){};
//void mmi_audply_stop_playing(){};
//void mmi_audply_show_playing_song_in_sub_LCD(){};
//int g_audply(){return 0;};
void mmiapi_enter_idle_screen_notify(){};
//void mmi_audply_entry_main(){};

#if 0
void mmi_fmgr_init(){};
void fmgr_launch(){};
void highlight_fmgr_rename(){};
void highlight_fmgr_delete_all_file(){};
void highlight_fmgr_delete(){};
void mmi_fmgr_select_path_and_enter(){};
void mmi_fmgr_kernel_get_file_count(){};
void mmi_fmgr_kernel_get_cur_idx(){};
void mmi_fmgr_hide_ext_name(){};
void mmi_fmgr_extract_ext_file_name() {};
void mmi_fmgr_kernel_get_file_info() {};
void fmgr_reset_app_select(){};
UI_string_ID_type GetFileSystemErrorString(S32 error) { return 0; };
#endif

//void mmi_audply_save_volume(){};
//void InitAudioPlayerApp(){};
//void evshed_resume_all_events(event_scheduler *es){};
void event_scheduler1_ptr(){};
//void lcd_fb_update_to_memory(){};
//void FS_GetDrive(){};
void mmi_phb_image_check_drive(){};
//void FS_Delete(){};
//void FS_CreateDir(){};
void writeRoamingStatusForMMS(){};
void setMmscVersion(){};
//void FS_Write(){};
//void mmi_vobj_entry_recv_object(){};
//void mmi_vobj_get_file_buffer_size(){};
//void mmi_vobj_init(){};
//void custom_get_fixed_ems_imelody_range(){};
//void mmi_vcard_forward_option_select_card(){};
//void mmi_vcard_forward_option_my_card(){};
//int mmi_audply_is_playing(){return 0;};
//void InitStopwatchApp(){};
//void InitStopwatchNVRAM(){};
//void mmi_audply_is_play_activated(){};
//void FS_SetAttributes() {};
//void mmi_audply_press_dec_volume() {};
//void mmi_audply_press_inc_volume() {};
//void mmi_audply_single_play(){};
//void mmi_audply_exit_subLCD() {};
//void mmi_audply_redraw_subLCD(BOOL is_show) {};
//void FS_FindClose() {};
//void FS_FindNext() {};
//void FS_FindFirst() {};

#ifdef MMI_ON_HARDWARE_P /* the same define in "Conversions.c", zhuoxz,2009-5-4 */
kal_int32 mmi_chset_convert(mmi_chset_enum src_type, mmi_chset_enum dest_type, char* src_buff, char* dest_buff, kal_int32 dest_size)
{
	memcpy(dest_buff, src_buff, dest_size );
	return pfnUnicodeStrlen( dest_buff ) * 2;
}
Ejemplo n.º 8
0
/**************************************************************

	FUNCTION NAME		: SECSETSetFdlEntryReq(void)
 
	INPUT PARAMETERS	: nil
	OUTPUT PARAMETERS	: nil
	RETURNS				: void
  	Author				: Vanita Jain
 
	 

**************************************************************/
void SECSETSetFdlEntryReq(void)
{
	MSG_PHB_SET_ENRTY_REQ_STRUCT *pMsgNewEntry = NULL ;
	MYQUEUE Message;
	//U8 pbName_ASCII[MAX_PB_NAME_LENGTH];
	U8 pbNumber_ASCII[MAX_PB_NUMBER_LENGTH+1];		
	module_type dest_mod_id = MOD_L4C + gSecSetupMenuSimID;


	EntrySECSETFDNBDNSaving();
	pMsgNewEntry  = (MSG_PHB_SET_ENRTY_REQ_STRUCT*) OslConstructDataPtr(sizeof(MSG_PHB_SET_ENRTY_REQ_STRUCT));

	 
	//memset(pMsgNewEntry->list.alpha_id.name, 0, strlen((PS8)pbName_ASCII)+1);
	//memset(pMsgNewEntry->list.tel.number, 0, strlen((PS8)pbNumber_ASCII)+1);
	memset(pMsgNewEntry->list.alpha_id.name, 0, MAX_PB_NAME_LENGTH+1);
	memset(pMsgNewEntry->list.tel.number, 0, MAX_PB_NAME_LENGTH+1);
	 

	pMsgNewEntry->type = MMI_PHB_FDN;
	pMsgNewEntry->no_data = 1;
	pMsgNewEntry->list.storage = MMI_SIM + gSecSetupMenuSimID;
	pMsgNewEntry->list.index = 0xFFFF; // For New Entry It should Always be 0xFFFF;
	pMsgNewEntry->list.record_index = 0xFFFF; // For New Entry It should be alaways 0xFFFF

	if(gpFDLBDLContext->FDNBDNEdit)//If entry is edited
	{
		pMsgNewEntry->list.index = gpFDLBDLContext->FDLBDLEntries[gpFDLBDLContext->HighlightedFDN].index;
		pMsgNewEntry->list.record_index = gpFDLBDLContext->FDLBDLEntries[gpFDLBDLContext->HighlightedFDN].record_index;
	}
	if (gpFDLBDLContext->FDLBDLNumber[0] == '+')//If Number is International
	{
		pMsgNewEntry->list.tel.type = MMI_CSMCC_INTERNATIONAL_ADDR; //INTERNATIONAL
		pMsgNewEntry->list.tel.length = (U8)pfnUnicodeStrlen((const S8 *)(gpFDLBDLContext->FDLBDLNumber+ ENCODING_LENGTH));
		UnicodeToAnsii((PS8)pbNumber_ASCII,(PS8)( gpFDLBDLContext->FDLBDLNumber+ ENCODING_LENGTH));
		memcpy(pMsgNewEntry->list.tel.number, pbNumber_ASCII, strlen((PS8)pbNumber_ASCII)+1);
	}
	else
	{
		pMsgNewEntry->list.tel.type = MMI_CSMCC_DEFAULT_ADDR_TYPE; //DEFAULT
		pMsgNewEntry->list.tel.length = (U8)pfnUnicodeStrlen((PS8)gpFDLBDLContext->FDLBDLNumber);
		UnicodeToAnsii((PS8)pbNumber_ASCII, (PS8)gpFDLBDLContext->FDLBDLNumber);
		memcpy(pMsgNewEntry->list.tel.number, pbNumber_ASCII, strlen((PS8)pbNumber_ASCII)+1);
	}
	if(GetUCS2Flag((PS8)gpFDLBDLContext->FDLBDLName)) {
		pMsgNewEntry->list.alpha_id.name_dcs = MMI_PHB_UCS2;
		pMsgNewEntry->list.alpha_id.name_length = ((U8)pfnUnicodeStrlen((PS8)gpFDLBDLContext->FDLBDLName))*ENCODING_LENGTH;
		BigEndianToLittleEndian((PS8)pMsgNewEntry->list.alpha_id.name, (PS8)gpFDLBDLContext->FDLBDLName);
	}
	else {
		pMsgNewEntry->list.alpha_id.name_dcs = MMI_PHB_ASCII;
		pMsgNewEntry->list.alpha_id.name_length = (U8)pfnUnicodeStrlen((PS8)gpFDLBDLContext->FDLBDLName);
		UnicodeToAnsii((PS8)pMsgNewEntry->list.alpha_id.name, (PS8)gpFDLBDLContext->FDLBDLName);
		PhbAsciiToGSM7Bit(pMsgNewEntry->list.alpha_id.name);
	}
	Message.oslSrcId=MOD_MMI;
	Message.oslDestId=dest_mod_id;
	Message.oslMsgId = PRT_PHB_SET_ENTRY_REQ;
	Message.oslDataPtr = (oslParaType *)pMsgNewEntry;
	Message.oslPeerBuffPtr= NULL;
	DeleteUptoScrID(SCR_ID_SECSET_FDN_LIST);
	DeleteScreenIfPresent(SCR_ID_SECSET_FDN_LIST);
	ExitSECSETFDNListReload();
	SetProtocolEventHandlerExt(SECSETSetFdlEntryRsp,PRT_PHB_SET_ENTRY_RSP,gSecSetupMenuSimID);
	OslMsgSendExtQueue(&Message);
}
Ejemplo n.º 9
0
//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);
			}

		}
	}
}
Ejemplo n.º 10
0
/**************************************************************

	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);
	}
}
Ejemplo n.º 11
0
void CALLSETBarringRsp(void * info )
{

	mmi_ss_call_barring_rsp_struct *pMsgBarringRsp = 
		(mmi_ss_call_barring_rsp_struct *) info ;
	U8 bs_index;

	memset(g_callset_cntx_p->SSDisplayBuffer,0, MAX_DISP_UCS2);

	DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OUT);
	DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_IN);
	DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_PASS);
	DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OLD_PASS);
	DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OPTION);
	DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_NEW_PASS);
	DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_CFRM_PASS);
	
	/* check the status of the response result */
	if(pMsgBarringRsp->result.flag == L4C_OK) {
		/* if the response is success check the type */
		switch ( pMsgBarringRsp->type) {
			/* call barring all outgoing calls */
			case L4_BAOC:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BAOC_A));
				break;
			/* call barring all outgoing international calls */
			case L4_BOIC:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BOIC_A));
				break;
			/* call barring all outgoing international calls except home */
			case L4_BOICEXHC:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BOICEXHC_A));
				break;
			/* call barring all incoming calls */
			case L4_BAIC:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BAIC_A));
				break;
			/* call barring all incoming roaming calls */
			case L4_BAICROAM:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BAICROAM_A));
				break;
			/* call barring cancel all calls */
			case L4_BAC:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BAC_A));
				break;
			/* call barring all outgoing calls */
			case L4_BOC:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BOC_A));
				break;
			/* call barring all incoming calls */
			case L4_BIC:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_BIC_A));
				break;
			default:
				pfnUnicodeStrcpy((PS8)g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_DEFAULT_A));
				break;
			}
			/* format the result string with active/deactive tags. */
			if (pMsgBarringRsp->count == 0 ) {
				pfnUnicodeStrcat((PS8) g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_DEACTIVATED));
			}
			for ( bs_index = 0; bs_index < pMsgBarringRsp->count; bs_index++)
			{
				if (( pfnUnicodeStrlen((PS8)GetString(STR_L4_ALL_TELESERVICES_EXCEPT_SMS))
						+ pfnUnicodeStrlen((PS8)GetString(STR_DEACTIVATED))
						+ pfnUnicodeStrlen((PS8)g_callset_cntx_p->SSDisplayBuffer)) < MAX_DISP_UCS2 / ENCODING_LENGTH) 
				{
					if (pMsgBarringRsp->list[bs_index].ss_status & SS_ABIT) 
			{
				pfnUnicodeStrcat((PS8) g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_ACTIVATED));
			}
			else
			{
				pfnUnicodeStrcat((PS8) g_callset_cntx_p->SSDisplayBuffer,(PS8)GetString(STR_DEACTIVATED));
			}
					AppendBScodeString( pMsgBarringRsp->list[bs_index].bs_code, (PS8)g_callset_cntx_p->SSDisplayBuffer);
				}
			}
		/* call the result screen function to display the result string */
//micha0322
		DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);			
		EntryCALLSETGeneralSSResut();
	}
	else {
		/* in case of response failure */
#ifdef  __MMI_SS_SHOW_CAUSE__
		ShowCauseString( pMsgBarringRsp->result.cause, (PS8)g_callset_cntx_p->SSDisplayBuffer);
//micha0322
		DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
		EntryCALLSETGeneralSSResut();
#else
		/* display the not done popup */
//micha0616
		if ( pMsgBarringRsp->result.cause == CM_SS_ERR_NEGATIVEPW_CHECK ) {
			DisplayPopup( (PU8) GetString( STR_SETTING_WRONG), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
		}
		else if (pMsgBarringRsp->result.cause == CM_SS_ERR_NUMBEROFPW_ATTEMPTSVIOLATION) {
			DisplayPopup( (PU8) GetString( STR_SETTING_BLOCK), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
		}
		else {
			DisplayPopup( (PU8) GetString( STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
		}

//micha0915
		RemoveSSReqScr();
#endif
	}
	aud_speech_set_mode(KAL_FALSE); //chenhe,070808. for callforward,CM_KB_OUTGOINGCALL is been sent,so have to do so here
	return;
}
Ejemplo n.º 12
0
/*****************************************************************************

	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);
    }

}