Exemplo n.º 1
0
/*****************************************************************************
 * FUNCTION
 *  avk_msg_mms_004
 * DESCRIPTION
 *  send mms
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern "C" void avk_msg_mms_004_cb(srv_mms_result_enum result, void *rsp_data, void * user_data)
{
    /*----------------------------------------------------------------*/
    /* Local Variables													*/
    /*----------------------------------------------------------------*/
	  
	U16 *screen_string;
  	S8 str_a[10];
	S8 str_temp[5];
	srv_mms_get_msg_num_rsp_struct *msg_rsp= (srv_mms_get_msg_num_rsp_struct*) rsp_data;
	
    /*----------------------------------------------------------------*/
    /* Code Body														*/
    /*----------------------------------------------------------------*/
	screen_string= (U16*) AVK_MALLOC(1024);
	
	mmi_wcscpy(screen_string, (WCHAR *)L"NO of Messages:\n 1. Drafts = ");
	sprintf((PS8)str_temp,(PS8)"%d",msg_rsp->rsp_tb[0]);
    mmi_asc_to_ucs2(str_a,str_temp);
	mmi_wcscat(screen_string,(WCHAR *)str_a);
	mmi_wcscat(screen_string,(WCHAR *)L"\n 2. Inbox = ");
	sprintf((PS8)str_temp,(PS8)"%d",msg_rsp->rsp_tb[1]);
    mmi_asc_to_ucs2(str_a,str_temp);
	mmi_wcscat(screen_string,(WCHAR *)str_a);
	mmi_wcscat(screen_string,(WCHAR *)L"\n 3. Outbox = ");
	sprintf((PS8)str_temp,(PS8)"%d",msg_rsp->rsp_tb[2]);
    mmi_asc_to_ucs2(str_a,str_temp);
	mmi_wcscat(screen_string,(WCHAR *)str_a);

    AVK_MANU_SHOW_SCR(screen_string,NULL,NULL);
	AVK_FREE(screen_string);
}
Exemplo n.º 2
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_create_csb_folder
 * DESCRIPTION
 *  Is csb Folder created
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void csb_frm_create_csb_folder(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S8 csb_folder_path_ascii[MAX_CSB_PATH_LENGTH];
	S8 csb_folder_path_unicode[MAX_CSB_PATH_LENGTH * ENCODING_LENGTH];
	FS_HANDLE ret_code;
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    sprintf(csb_folder_path_ascii, "%c%s", MMI_CARD_DRV, CSB_DEFAULT_FOLDER);
    mmi_asc_to_ucs2((S8*) csb_folder_path_unicode, (S8*) csb_folder_path_ascii);

	ret_code = FS_GetFolderSize((PU16)csb_folder_path_unicode, FS_COUNT_IN_BYTE, NULL, 0);
	if(ret_code == FS_PATH_NOT_FOUND)
	{
		FS_CreateDir((PU16) csb_folder_path_unicode);
}

    sprintf(csb_folder_path_ascii, "%c%s", MMI_PUBLIC_DRV, CSB_DEFAULT_FOLDER);
    mmi_asc_to_ucs2((S8*) csb_folder_path_unicode, (S8*) csb_folder_path_ascii);

	ret_code = FS_GetFolderSize((PU16)csb_folder_path_unicode, FS_COUNT_IN_BYTE, NULL, 0);
	if(ret_code == FS_PATH_NOT_FOUND)
	{
		FS_CreateDir((PU16) csb_folder_path_unicode);
	}
}
Exemplo n.º 3
0
static S32 mmi_dailer_list_get_hint_item(S32 item_index, UI_string_type *hint_array)
{

#if 1
	return 0;
#else
	/*----------------------------------------------------------------*/
	/* Local Variables                                                */
	/*----------------------------------------------------------------*/
	U16 i, count, store_index;
	S8 temp_number[30 * ENCODING_LENGTH];
	S8 tmp[30];
	S32 index;
	U8 num_ascii[MAX_PB_NUMBER_LENGTH + 1 + 1];

	if (item_index > total_items)
	{		
		return 0;	
	}

	index = list_filter_index_array[item_index];

#if 1
	mmi_phb_convert_to_digit(num_ascii, PhoneBook[index].tel.number, MAX_PB_NUMBER_LENGTH + 1);
	mmi_asc_to_ucs2((S8*) temp_number, (S8 *)num_ascii);
#else

	for (i = 0; i < 10; i++)
	{
		if (index >= 0 && index <= 9)
			tmp[i] = index + '0';
		else
		{
			S16 c;

			c = index + 'A';
			if (c > 'Z')
			{
				c = 'A';
			}
			
			tmp[i] = c;
		}
	}
	
	tmp[i] = '\0';
	mmi_asc_to_ucs2((S8*) temp_number, tmp);
#endif	
	

	mmi_ucs2cpy((S8*) hint_array[0], (S8*) temp_number);

	return 1;   /* One hint data only, can be more hints. */
#endif	
}
Exemplo n.º 4
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_prepare_hint_data
 * DESCRIPTION
 *  Creates a list if Hint Popups for Search by App
 * PARAMETERS
 *  nIndex				[IN]            
 * RETURNS				void
 *****************************************************************************/
void csb_frm_prepare_hint_data(U16 index)
{
	/*----------------------------------------------------------*/
    /* Local Variables                                          */
    /*----------------------------------------------------------*/
	S8	hint_popup_in_ascii[MAX_CSB_HINT_LENGTH];

	/*----------------------------------------------------------*/
    /* Code Body                                                */
    /*----------------------------------------------------------*/

	/* This hintData is Global hint data used for HINTS */
	memset((PS8) hintData[index], 0, sizeof(hintData[index]));

	if(SEARCH_MODE_CONTROL == csb_frm_get_search_mode())
	{
		/* ASSERT if the index comes greater than the csb_search_hint_popups array size */
		ASSERT(index < CSB_TOTAL_CONTROLS);
		sprintf((S8*) hint_popup_in_ascii, "%d ", csb_search_hint_popups[index]);
	}
	else if(SEARCH_MODE_APP == csb_frm_get_search_mode())
	{
		/* ASSERT if the index comes greater than the csb_app_hint_popups array size */
		ASSERT(index < CSB_TOTAL_APP);
		sprintf((S8*) hint_popup_in_ascii, "%d ", csb_app_hint_popups[index]);
	}
	mmi_asc_to_ucs2((PS8) hintData[index], (PS8) hint_popup_in_ascii);
}
Exemplo n.º 5
0
/*****************************************************************************
 * FUNCTION
 *  mmi_netset_set_user_ctrl_plmn_add_inline_editor
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_netset_set_user_ctrl_plmn_add_inline_editor(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    memset(gUserCtrlPlmnList.PlmnAddNumber, 0, (MAX_PLMN_LEN + 1) * ENCODING_LENGTH);
    memset(gUserCtrlPlmnList.PlmnAddString, 0, MAX_LENGTH_DISPLAY_NAME * ENCODING_LENGTH);

    if (!IsScreenPresent(SCR_ID_NETSET_USER_CTRL_PLMN_LIST))
    {
        mmi_asc_to_ucs2((S8*) gUserCtrlPlmnList.PlmnAddNumber, (S8*) gPLMN);
    }

    SetInlineItemActivation(&wgui_inline_items[0], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
    SetInlineItemCaption(&wgui_inline_items[0], (PU8) GetString(STR_ID_NETSET_PRR_MCC_CAPTION));

    SetInlineItemActivation(&wgui_inline_items[1], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
    SetInlineItemTextEdit(
        &wgui_inline_items[1],
        (PU8) gUserCtrlPlmnList.PlmnAddNumber,
        MAX_PLMN_LEN + 1,
        INPUT_TYPE_NUMERIC);
    //SetInlineItemFullWidth(&wgui_inline_items[1]);
    EnableInlineItemBoundary(&wgui_inline_items[1]);
    DisableInlineItemHighlight(&wgui_inline_items[1]);

    SetInlineItemActivation(&wgui_inline_items[2], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
    SetInlineItemCaption(&wgui_inline_items[2], (PU8) GetString(STR_ID_NETSET_OP_NAME_CAPTION));

    SetInlineItemActivation(&wgui_inline_items[3], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
    SetInlineItemTextEdit(
        &wgui_inline_items[3],
        (PU8) gUserCtrlPlmnList.PlmnAddString,
        MAX_LENGTH_DISPLAY_NAME,
        INPUT_TYPE_ALPHANUMERIC_LOWERCASE | INPUT_TYPE_USE_ONLY_ENGLISH_MODES);
#if defined(__MMI_TOUCH_SCREEN__)
    SetInlineTextEditCustomFunction(&wgui_inline_items[3], mmi_phb_op_email_custom_function);
#endif
    //SetInlineItemFullWidth(&wgui_inline_items[3]);
    EnableInlineItemBoundary(&wgui_inline_items[3]);
    DisableInlineItemHighlight(&wgui_inline_items[3]);

#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif
}
Exemplo n.º 6
0
/*****************************************************************************
 * FUNCTION
 *  mmi_vt_ucm_act_req
 * DESCRIPTION
 *  function which is called by UCM
 * PARAMETERS
 *
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_vt_ucm_act_req(U8 op_code, void *act_struct)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    switch (op_code)
    {
    	case MMI_UCM_DIAL:
        {
			S8 dial_number[MAX_NUMBER];
            
            SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_DIAL);
    
            memset(dial_number, 0, MAX_NUMBER);
            mmi_asc_to_ucs2((PS8) dial_number, (PS8)((mmi_ucm_dial_req_struct*) act_struct)->num_uri);
        	mmi_vt_make_video_call((PS8)dial_number);
        }
        break;

        case MMI_UCM_ACCEPT:
        {
            SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_ACCEPT);
			mmi_gsm_accept(act_struct);
        }
        break;

        case MMI_UCM_END_SINGLE:
        {
            SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_END_SINGLE);
			mmi_gsm_end_single(act_struct);
        }
        break;

        case MMI_UCM_FORCE_RELEASE:
        {
            SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_FORCE_RELEASE);
			mmi_gsm_force_release(act_struct);
        }
		break;

        case MMI_UCM_AUTO_REJECT:
        {
            SetUCMOperationState(MMI_GSM_UCM_NORMAL, MMI_GSM_UCM_AUTO_REJECT);
			mmi_gsm_auto_reject(act_struct);
        }
		break;
			
    	default:
        {
            MMI_ASSERT(0);
        }
        break;
    }
}
Exemplo n.º 7
0
static pBOOL mmi_dailer_list_get_item(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask)
{
	unsigned short wtmp[50];
	S32 index;
	U8 num_ascii[MAX_PB_NUMBER_LENGTH + 1 + 1];
	U16 num_ascii_wchar[MAX_PB_NUMBER_LENGTH + 1 + 1];
	S16 store_index;


	if (item_index > total_items)
	{		
		return MMI_FALSE;	
	}
#if 0//(NEW_DIAL_SCREEN)
	// 第一个列表元素设为用户输入
	if (item_index == FIRST_USER_INPUT_INDEX)
	{
		mmi_ucs2cpy((S8 *)str_buff, (S8 *)input_buffer);
		*img_buff_p = NULL;

		return MMI_TRUE;
	}
#endif

	// 电话本处理
	index = list_filter_index_array[item_index];
	store_index = g_phb_name_index[index];
	
	if (mmi_ucs2strlen((S8*) (PhoneBook[store_index].alpha_id.name)))
	{	
		// name
		mmi_ucs2cpy((S8*) str_buff, (S8*) (PhoneBook[store_index].alpha_id.name));
		//stretch_eight_chars_width(str_buff);
	
		// phone number
	#if 1   //>>luchongguang mod 2009-07-10 Bug #12887 存储+86的号码,然后待机界面输入号码前几位快速选择呼叫,字符“+”会被去掉,拨打电话失败 
		mmi_phb_convert_get_ucs2_number((S8*) num_ascii_wchar, store_index);
	#else
		mmi_phb_convert_to_digit_by_storage(num_ascii, PhoneBook[store_index].tel.number, MAX_PB_NUMBER_LENGTH + 1,MMI_NVRAM);
		mmi_asc_to_ucs2((S8 *)num_ascii_wchar, (S8 *)num_ascii);
	#endif  /* Bug #12994 */

		mmi_ucs2cat((S8*) str_buff, (S8 *)L"  ");
		mmi_ucs2cat((S8 *)str_buff, (S8 *)num_ascii_wchar);		
	}
	else
	{
		 mmi_phb_convert_get_ucs2_number((S8*) str_buff, store_index);
	}
	

	*img_buff_p = NULL;

	return MMI_TRUE;
}
Exemplo n.º 8
0
/*****************************************************************************
 * FUNCTION
 *  mmi_brw_stored_page_pre_entry_page_properties
 * DESCRIPTION
 *  Entry function for store page properties
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_stored_page_pre_entry_page_properties(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
	S8 temp_str[100];
	applib_time_struct time_obj;
	S32 local_time_in_sec;
	S32 page_size;
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
	MMI_ASSERT(g_brw_cntx.saved_page_properties_p);

	mmi_brw_object_properties_reset();

	if(g_brw_cntx.saved_page_properties_p)
	{
		g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_NAME] = MMI_TRUE;
		mmi_chset_utf8_to_ucs2_string((U8*)g_brw_obj_properties_cntx.obj_name, (BRW_OBJECT_PROPERTIES_NAME_LEN+1)*ENCODING_LENGTH,
			(U8*)g_brw_cntx.saved_page_properties_p->label);

		g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_ADDRESS] = MMI_TRUE;
		mmi_chset_utf8_to_ucs2_string((U8*)g_brw_obj_properties_cntx.obj_address, (BRW_OBJECT_PROPERTIES_ADDRESS_LEN+1)*ENCODING_LENGTH,
			(U8*)g_brw_cntx.saved_page_properties_p->url);

		g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_SIZE] = MMI_TRUE;
		page_size = (S32)g_brw_cntx.saved_page_properties_p->data_size;
		if( page_size > 0 )
		{
	        mmi_brw_convert_int_to_unicode_string((U8*)temp_str,(U32)g_brw_cntx.saved_page_properties_p->data_size);
	        mmi_ucs2cat((S8*)temp_str,(S8*)L" ");
	        mmi_ucs2cat((S8*)temp_str,(S8*)get_string(STR_ID_BRW_BYTES));
		}
		else
		{
			mmi_ucs2cpy((S8*)temp_str,(S8*)get_string(STR_ID_BRW_UNKNOWN));
		}
		mmi_ucs2cpy((S8*)g_brw_obj_properties_cntx.obj_size, (S8*)temp_str);

		g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_DATE] = MMI_TRUE;
		local_time_in_sec = applib_dt_sec_utc_to_local(g_brw_cntx.saved_page_properties_p->date);
		if(applib_dt_utc_sec_2_mytime(local_time_in_sec, &time_obj, MMI_FALSE))
		{
			sprintf((S8*) temp_str, "%d/%d/%d", time_obj.nMonth, time_obj.nDay, time_obj.nYear);
			mmi_asc_to_ucs2((S8*)g_brw_obj_properties_cntx.obj_date, (S8*)temp_str);
		}
	}

	g_brw_obj_properties_cntx.prop_count = BRW_STORED_PAGE_PROPERTIES_COUNT;
	mmi_brw_entry_object_properties();
}
Exemplo n.º 9
0
/*****************************************************************************
 * FUNCTION
 *  HintGPRSCountAllReceived
 * DESCRIPTION
 *  
 * PARAMETERS
 *  index       [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void HintGPRSCountAllReceived(U16 index)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 value[MAX_SUB_MENU_HINT_SIZE];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* reinitialize the hint data */

    memset((PS8) hintData[(index)], 0, sizeof(hintData[(index)]));
    /* micha0216 */
    sprintf((S8*) value, "%d B", gprsTotalReceived);
    mmi_asc_to_ucs2((PS8) hintData[(index)], (PS8) value);
    return;
}
Exemplo n.º 10
0
/*****************************************************************************
 * FUNCTION
 *  mmi_brw_stored_page_memory_status
 * DESCRIPTION
 *  This func is used for getting the stored page memory status
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_stored_page_memory_status(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
 
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
	if(g_brw_display_info_str)
	{
		mmi_brw_mfree(g_brw_display_info_str);
	}
	g_brw_display_info_str = mmi_brw_malloc(BRW_MEMORY_STATUS_MSG_LEN+1);

	mmi_asc_to_ucs2((S8*)g_brw_display_info_str, (S8*)"Stored Page Memory Status");

	mmi_brw_entry_memory_status();
}
Exemplo n.º 11
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_save_screen_shot
 * DESCRIPTION
 *  Function to create the file path and save the 
 *	LAYER contents in JPEG format
 * PARAMETERS
 *  U32			cat_ID
 * RETURNS
 *  void
 *****************************************************************************/
pBOOL csb_frm_save_screen_shot(U32 nIndex)
{
	/*----------------------------------------------------------*/
    /* Local Variables                                          */
    /*----------------------------------------------------------*/

	U8	file_name_prefix_in_unicode[MAX_CSB_SCREEN_NAME_LENGTH * ENCODING_LENGTH];
	U8	file_name_prefix_in_ascii[MAX_CSB_SCREEN_NAME_LENGTH] = "category_";
	U8	local_file_path[MAX_CSB_PATH_LENGTH * ENCODING_LENGTH];
	
	gdi_handle handle = GDI_NULL_HANDLE;
	GDI_RESULT	error;

	/*----------------------------------------------------------*/
    /* Code Body                                                */
    /*----------------------------------------------------------*/

	/* Convert Ansii string to Unicode */
 	mmi_asc_to_ucs2((PS8) file_name_prefix_in_unicode, (PS8) file_name_prefix_in_ascii);

	mmi_ucs2cpy((PS8)local_file_path, (PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path);

	/* Concatenate the category screen prefix to the file name -- "category_" */
	mmi_ucs2cat((PS8)local_file_path, (PS8) file_name_prefix_in_unicode);
	/* Concatenate the category ID to the file name */
	mmi_ucs2cat((PS8)local_file_path, (PS8) g_CSB_struct.pscreen_info[nIndex].cat_scr_name);
	/* Append the extension of the file -- ".jpg" */
	mmi_ucs2cat((PS8)local_file_path, (PS8) L".jpg\0");

	/* Merge all the layers to one */
	gdi_layer_flatten_previous_to_base();
	handle = GDI_LAYER_MAIN_BASE_LAYER_HANDLE;

	/* API to save the snapshot of the given the LAYER handle at the given path */
	error = gdi_layer_save_jpeg_file(handle, (S8*) local_file_path);

	if(error == GDI_FAILED)
	{
		return FALSE;
	}
	return TRUE;
}
Exemplo n.º 12
0
void category658_highlight_handler(S32 item_index)
{
	S32 index;
	S16 store_index;
	U8 num_ascii[MAX_PB_NUMBER_LENGTH + 1 + 1];


	memset(CallBuffer, 0, sizeof(CallBuffer));
	
	if (item_index > total_items)
	{		
		return ;	
	}

#if 0//(NEW_DIAL_SCREEN)
	if (item_index == FIRST_USER_INPUT_INDEX)
	{
		mmi_ucs2cpy((S8 *)CallBuffer, (S8 *)input_buffer);
		return;
	}
#endif
	index = list_filter_index_array[item_index];
	store_index = g_phb_name_index[index];

        // Bug #13052, 电话簿存储+86的号码,待机界面输入手机号码前几位快速选择呼叫,字符“+”会被去掉,拨打电话失败 ouyangyi 090711
	if (((PhoneBook[store_index].tel.type & 0x90) == 0x90) && (PhoneBook[store_index].tel.type != 0xFF))
	{
		num_ascii[0] = '+';
		//mmi_phb_convert_to_digit_by_storage(num_ascii + 1, PhoneBook[store_index].tel.number, MAX_PB_NUMBER_LENGTH + 1, MMI_NVRAM);
		mmi_phb_convert_to_digit(num_ascii + 1, PhoneBook[store_index].tel.number, MAX_PB_NUMBER_LENGTH + 1);

	}
	else
	// End Bug #13052   Bug #12994
	//mmi_phb_convert_to_digit_by_storage(num_ascii, PhoneBook[store_index].tel.number, MAX_PB_NUMBER_LENGTH + 1, MMI_NVRAM);
	mmi_phb_convert_to_digit(num_ascii, PhoneBook[store_index].tel.number, MAX_PB_NUMBER_LENGTH + 1);

	mmi_asc_to_ucs2((S8 *)CallBuffer, (S8 *)num_ascii);
}
Exemplo n.º 13
0
/*****************************************************************************
 * FUNCTION
 *  mmi_netset_construct_user_ctrl_plmn_hint
 * DESCRIPTION
 *  
 * PARAMETERS
 *  hintArray       [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_netset_construct_user_ctrl_plmn_hint(U8 **hintArray)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U8 i;
    U32 plmn_num;
    U8 plmn_tmp[MAX_PLMN_LEN + 1];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    for (i = 0; i < gUserCtrlPlmnList.PlmnListSize; i++)
    {
        memset((S8*) hintData[i], 0, MAX_SUB_MENU_SIZE);
        memcpy((char*)(&plmn_num), gUserCtrlPlmnList.PrefPLMN[i], sizeof(U32));

        mmi_netset_bcd_short_2_plmn_str(plmn_num, plmn_tmp);

        mmi_asc_to_ucs2((S8*) hintData[i], (S8*) plmn_tmp);
        hintArray[i] = hintData[i];
    }
}
Exemplo n.º 14
0
static MMI_BOOL mmi_ssc_set_imei(void *buf)
{
    U8 tempbufimei[(MAX_IMEI_LEN + 1) * ENCODING_LENGTH];
	#ifdef __MMI_IMEISV_SUPPORT__
	U8 tempbufsvn[(MAX_IMEI_LEN + 1) * ENCODING_LENGTH];
	#endif
	//U8 tempbuf[(MAX_IMEI_LEN + 1) * ENCODING_LENGTH];
    mmi_nw_get_imei_rsp_struct *imeiresponse = (mmi_nw_get_imei_rsp_struct*) buf;
        
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    mmi_frm_clear_protocol_event_handler(MSG_ID_MMI_NW_GET_IMEI_RSP, NULL);
     
    if (imeiresponse->result == 1)
    {
    #if 0
    #ifdef __ASCII
/* under construction !*/
    #endif 
/* under construction !*/
    #ifdef __UCS2_ENCODING
    #ifdef __MMI_IMEISV_SUPPORT__
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
    #else /* __MMI_IMEISV_SUPPORT__ */ 
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
    #endif /* __MMI_IMEISV_SUPPORT__ */
    #endif /* __UCS2_ENCODING */
	#else
	
     #ifdef __UCS2_ENCODING
		mmi_asc_to_ucs2((CHAR*) tempbufimei, (CHAR*) imeiresponse->imei);
	 
       #ifdef __MMI_IMEISV_SUPPORT__
		mmi_asc_to_ucs2((CHAR*) tempbufsvn, (CHAR*) imeiresponse->svn);
		kal_wsprintf((WCHAR *) gstrIMEI,"%wIMEI:%w\nSVN:%w\n",gstrIMEI,tempbufimei,tempbufsvn);
		#else
		kal_wsprintf((WCHAR *) gstrIMEI,"%wIMEI:%w\n",gstrIMEI,tempbufimei);
		#endif
	#endif
		
	#endif

        return MMI_TRUE;
    }
    else
    {
        return MMI_FALSE;
    }
}
Exemplo n.º 15
0
/*****************************************************************************
 * FUNCTION
 *  mmi_rmgr_populate_drm_info_aux
 * DESCRIPTION
 *  
 * PARAMETERS
 *  rights          [?]         
 *  permission      [IN]        
 *  data            [?]         
 * RETURNS
 *  
 *****************************************************************************/
kal_bool mmi_rmgr_populate_drm_info_aux(kal_wchar *path, kal_uint8 app_perm, kal_uint8 *data, kal_int32 ref)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    FS_HANDLE input = FS_ERROR_RESERVED;
    kal_int32 start = 0, end = 0, cons_ret = DRM_RESULT_NON_DRM;
    kal_bool ret = KAL_FALSE, flag = KAL_TRUE;
    kal_uint8 permission;
    drm_method_enum method;
        
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* permission's incorrect, but ok here*/
    if (app_perm == DRM_PERMISSION_ALL)
         permission = DRM_PERMISSION_PLAY;
    else
        permission = app_perm;
    
    if(ref < 0)
    {
        input = DRM_open_file(path, FS_READ_ONLY, permission);

        if (input < FS_NO_ERROR)
            return ret;
        
        method = DRM_get_object_method(input, NULL);    
    }
    else
    {
        method = DRM_get_object_method_by_ref(ref);
    }
    
    if (method != DRM_METHOD_NONE)
    {
        if (ref < 0)
        {
            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_RIGHT));
            mmi_ucs2cat((PS8) data, (PS8) L"\n");
            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_PROTECTED));
            mmi_ucs2cat((PS8) data, (PS8) L"\n");
        }
    }
    else
    {
        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_RIGHT));
        mmi_ucs2cat((PS8) data, (PS8) L"\n");
        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_UNPROTECTED));
        mmi_ucs2cat((PS8) data, (PS8) L"\n");

        if (ref < 0)
        {
            DRM_close_file(input);
        }
        else
        {
            DRM_free_ro_detail();
        }
        return ret;
    }

#ifdef __DRM_V02__
    if (ref < 0)
    {
        kal_wchar *sepa = kal_wstrrchr(path, (kal_int32) '\\');
    
        if (DRM_is_archive(input, NULL) && sepa && kal_wstrncmp(sepa - 4, L".odf\\", 5) != 0)
        {
            /* Multi Part ODF */
            mmi_ucs2cat((PS8) data, (PS8) L" ");
            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_MULTI_PART));
            mmi_ucs2cat((PS8) data, (PS8) L"\n");
            return ret;
        }
    }
#endif    
    
    if (method == DRM_METHOD_FORWARD_LOCK)
    {
        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_SUMMARY));
        mmi_ucs2cat((PS8) data, (PS8) L"\n");
        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_UNLIMITED));
        mmi_ucs2cat((PS8) data, (PS8) L"\n");
        
        if (ref < 0)
        {
            DRM_close_file(input);
        }
        else
        {
            DRM_free_ro_detail();
        }
        return ret;
    }

   
    do
    {
        if (permission & (DRM_PERMISSION_PLAY | DRM_PERMISSION_DISPLAY | DRM_PERMISSION_EXECUTE | DRM_PERMISSION_PRINT | DRM_PERMISSION_EXPORT))
        {
            drm_constraint_struct cons;
            if (ref < 0)
            {
                if (app_perm == DRM_PERMISSION_ALL && permission != DRM_PERMISSION_PLAY)
                {
                    input = DRM_open_file(path, FS_READ_ONLY, permission);

                    if (input < FS_NO_ERROR)
                        return KAL_FALSE;
                }
                
                cons_ret = DRM_get_constraint(input, NULL, permission, &cons);
            }
            else
            {
                cons_ret = DRM_get_constraint_by_ref(ref, permission, &cons);
            }
            
            if (cons_ret >= DRM_RESULT_OK && cons.status == DRM_STATUS_RIGHTS_PRESENT)
            {
                
                if (flag)
                {
                    mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_SUMMARY));
                    mmi_ucs2cat((PS8) data, (PS8) L"\n");
                    flag = KAL_FALSE;
                }

                switch(permission)
                {
                    case DRM_PERMISSION_PLAY:
                        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_PLAY));
                        mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        break;
                    case DRM_PERMISSION_DISPLAY:
                        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_DISPLAY));
                        mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        break;
                    case DRM_PERMISSION_EXECUTE:
                        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_EXECUTE));
                        mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        break;
                    case DRM_PERMISSION_PRINT:
                        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_PRINT));
                        mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        break;
                    case DRM_PERMISSION_EXPORT:
                        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_EXPORT));
                        mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        break;
                    default:
                        break;
                }

                if (((method & DRM_METHOD_COMBINED_DELIVERY) ||
                     (method & DRM_METHOD_SEPARATE_DELIVERY) || 
                     (method & DRM_METHOD_V2)) &&
                    (cons.status != DRM_STATUS_NO_RIGHTS))
                {
                
                    MYTIME t;
                    S8 buffer[20];
                    drm_constraint_struct *constraint;
                
                    constraint = &cons;
                    
                    if (constraint->type != DRM_CONSTRAINT_NONE)
                    {
                        if (constraint->type & DRM_CONSTRAINT_COUNT)
                        {
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_COUNT));
                            sprintf((char*)buffer, "\n%d/%d", constraint->used_count, constraint->total_count);
                            mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer);
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        }

                #ifdef __DRM_V02__
                        if (constraint->type & DRM_CONSTRAINT_ACCUMULATED)
                        {
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_ACCUMULATED));
                            sprintf((char*)buffer, "\n%d ", constraint->accum_dur);
                            mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer);
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_SEC));
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        }
                    
                        if (constraint->type & DRM_CONSTRAINT_TIMEDCOUNT)
                        {
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_TIMEDCOUNT));
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");
                            sprintf((char*)buffer, "%d ", constraint->timed_count);
                            mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer);
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_TIMEDCOUNT_TIME));
                            sprintf((char*)buffer, "%d ", constraint->period);
                            mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer);
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_SEC));
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        }
                #endif /* __DRM_V02__ */

                        if (constraint->type & DRM_CONSTRAINT_DATETIME)
                        {
                            if ((constraint->type & DRM_CONSTRAINT_INTERVAL) && constraint->start_intv != 0)
                            {
                                 /* date time contains interval -> show interval*/
                                 if (constraint->start_time <= constraint->start_intv &&
                                      constraint->end_time >= constraint->end_intv)
                                 {
                                          start = constraint->start_intv;
                                          end = constraint->end_intv;
                                 }
                                 /* interval contains date time -> show date time*/
                                 else if (constraint->start_intv <= constraint->start_time &&
                                      constraint->end_intv >= constraint->end_time)
                                 {
                                          start = constraint->start_time;
                                          end = constraint->end_time;
                                 }
                                 /* date time overlaps interval -> show overlap*/
                                 else if (constraint->start_intv <= constraint->start_time &&
                                      constraint->end_intv <= constraint->end_time && 
                                      constraint->start_time <= constraint->end_intv)
                                 {
                                          start = constraint->start_time;
                                          end = constraint->end_intv;
                                 }
                                 /* interval overlaps date time -> show overlap*/
                                 else if (constraint->start_time <= constraint->start_intv &&
                                      constraint->end_time <= constraint->end_intv &&
                                      constraint->start_intv <= constraint->end_time)
                                 {
                                      start = constraint->start_intv;
                                    end = constraint->end_time;
                                 }
                                 else
                                 {
                                          start = constraint->start_intv;
                                          end = constraint->end_intv;
                                 }
                            }
                            else
                            {
                                start = constraint->start_time;
                                end = constraint->end_time;
                            }
                        }
                        else if (constraint->type & DRM_CONSTRAINT_INTERVAL)
                        {
                            if (constraint->interval <= 0)
                            {
                                start = -1;
                                end = -1;
                            }
                            else
                            {
                                start = constraint->start_intv;
                                end = constraint->end_intv;
                            }
                        }
                        
                        if (start > 0)
                        {
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_START));
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");
                            mmi_dt_utc_sec_2_mytime(start, &t, FALSE);
                            date_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN);
                            mmi_ucs2cat((PS8) data, (PS8) L" ");
                            time_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN);
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");
                        }
                    
                        if (end > 0)
                        {
                            mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_END));
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");
                            mmi_dt_utc_sec_2_mytime(end, &t, FALSE);
                            date_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN);
                            mmi_ucs2cat((PS8) data, (PS8) L" ");
                            time_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN);
                            mmi_ucs2cat((PS8) data, (PS8) L"\n");                    
                        }
                    }
                    else
                    {
                        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_UNLIMITED));
                        mmi_ucs2cat((PS8) data, (PS8) L"\n");
                    }

                }
                
            }

            if (ref < 0)
            {
                DRM_close_file(input);
            }

        }

        permission = permission<<1;
    }
    while(permission < DRM_PERMISSION_ALL && app_perm == DRM_PERMISSION_ALL);
    
    if (flag)
    {
        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_SUMMARY));
        mmi_ucs2cat((PS8) data, (PS8) L"\n");
        mmi_ucs2cat((PS8) data, (PS8) GetString(STR_GLOBAL_INVALID));
        mmi_ucs2cat((PS8) data, (PS8) L"\n");
    }

    return ret;
}
Exemplo n.º 16
0
/*****************************************************************************
 * FUNCTION
 *  srv_clog_si_log_si2cmn
 * DESCRIPTION
 *  
 * PARAMETERS
 *  sort_info       [?]         
 *  fields          [IN]        
 *  log             [?]         
 * RETURNS
 *  
 *****************************************************************************/
S32 srv_clog_si_log_si2cmn(srv_clog_si_struct *sort_info, U32 fields, srv_clog_log_struct *log)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    S32 i;
    srv_clog_call_log_struct *call_log;
    kal_uint8 call_number[SRV_CLOG_CID_MAX_LEN + 1];
    WCHAR phb_num[SRV_CLOG_CID_MAX_LEN + 1];
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    memset(log, 0x0, sizeof(srv_clog_log_struct));
    log->cate = SRV_CLOG_CATE_CALL;     // only support call log now

    if (!srv_clog_si_log_is_valid(sort_info))
        return SRV_CLOG_RET_EMPTY;
    if (fields == 0)
        fields = SRV_CLOG_LOG_FIELD_ALL;

    call_log = &log->data.call_log;
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_IDENTITY))
    {
        call_log->cate = SRV_CLOG_CATE_CALL;
        call_log->sim_id = SRV_CLOG_PI_P2IDX(SRV_CLOG_SILOG_GET_TYPE_ID(sort_info), SRV_CLOG_TSP_SIM_ID_GRP, SRV_CLOG_TSP_SIM_ID_POS)+1;
        call_log->log_type = SRV_CLOG_PI_P2IDX(SRV_CLOG_SILOG_GET_TYPE_ID(sort_info), SRV_CLOG_TSP_CLT_GRP, SRV_CLOG_TSP_CLT_POS);
        call_log->sub_type = SRV_CLOG_CALL_TYPE_VOICE;
    }
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_LOG_ID))
    {
        call_log->log_id = SRV_CLOG_SILOG_GET_LOG_ID(sort_info);
    }
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_TIMESTAMP))
    {
        memcpy(call_log->timestamp, sort_info->timestamp, sizeof(sort_info->timestamp[0]) * SRV_CLOG_TIME_DETAIL_MAX_NUM);
    }
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_DURATION))
    {
        for (i = 0; i < SRV_CLOG_TIME_DETAIL_MAX_NUM; i++)
            call_log->duration[i] = sort_info->duration[i];
    }
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_TOTAL_NUM))
    {
        call_log->total_num = SRV_CLOG_SILOG_GET_TOTALNUM(sort_info);
    }
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_UNREAD_NUM))
    {
        call_log->unread_num = SRV_CLOG_SILOG_GET_UNREADNUM(sort_info);
    }
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_IS_NEW_EVENT))
    {
        call_log->is_new_event = SRV_CLOG_PI_P2IDX(SRV_CLOG_SILOG_GET_TYPE_ID(sort_info), SRV_CLOG_TDP_NEW_EVENT_GRP, SRV_CLOG_TDP_NEW_EVENT_POS);
    }

    srv_clog_si_log_get_cid(sort_info, call_number, SRV_CLOG_CID_MAX_LEN);
    if ( SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_PHB_ID) )
    {
    #ifdef __MMI_CLOG_PHB_SYNC_SUPPORT__
        /* Check if cid is same when phb_id is same, if both same, get name from phb, if not, the phb number may be damaged abnormally,
            in some abnormally case, the cid is different even phb_id is same,
            such as insert the sim card in another target and modify the phb number and then insert back to this target,
            the phb entry may be changed greatly even with same phb_id, if so, just show the name saved in calllog,
            temp solution for this special case */
        MMI_BOOL ret2;
        WCHAR log_num[SRV_CLOG_CID_MAX_LEN + 1];
        
        ret2 = srv_phb_get_number_by_number_id(phb_num, SRV_CLOG_SILOG_GET_PHB_ID(sort_info), SRV_CLOG_CID_MAX_LEN);

        if (ret2)
        {
            mmi_asc_n_to_ucs2((CHAR *)log_num, call_number, SRV_CLOG_CID_MAX_LEN);
            /* PHB_ID is same, if number is same too, we will use contact's name, else
                PHB_ID is same, but number is diff, we will set NULL to log name and set invalid PHB_ID to log */
            if (srv_phb_compare_number(phb_num, log_num))
                srv_phb_get_name_by_number_id(call_log->name, SRV_CLOG_SILOG_GET_PHB_ID(sort_info), SRV_CLOG_NAME_MAX_LEN);
            else
            {
                /* TODO: save it to NVRAM? */
                SRV_CLOG_SET_INVALID_PHB_ID(sort_info->phb_id);
            }
        }

        if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_PHB_ID))
            call_log->phb_id = SRV_CLOG_SILOG_GET_PHB_ID(sort_info);
    #else /* __MMI_CLOG_PHB_SYNC_SUPPORT__ */
        mmi_asc_n_to_wcs(phb_num, (CHAR*)call_number,  SRV_CLOG_CID_MAX_LEN);
        srv_phb_get_name_by_number(phb_num, call_log->name, SRV_CLOG_NAME_MAX_LEN);
    #endif /* __MMI_CLOG_PHB_SYNC_SUPPORT__ */
    }
    
    if (SRV_CLOG_CHECK_BIT(fields, SRV_CLOG_LOG_FIELD_CID))
    {
        mmi_asc_to_ucs2((CHAR*) call_log->cid, (CHAR*) call_number);
    }
    
    return SRV_CLOG_RET_OK;
}
Exemplo n.º 17
0
/*****************************************************************************
 * FUNCTION
 *  mmi_brw_new_push_msg_ind_on_idlescreen
 * DESCRIPTION
 *  Entry Function to display screen for push message arrived indication
 *  on idle-screen.
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_brw_new_push_msg_ind_on_idlescreen(void)   /* added by puneet */
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    S8 buf[4] = {0};
    S8 pOutBuffer[8] = {0};
    S8 message_string[40] = {0};
    U32 brw_total_msg_count = 0;
    U32 brw_unread_msg_count = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    mmi_brw_get_push_statistics(&brw_total_msg_count, &brw_unread_msg_count);

    if (SCR_ID_BRW_NEW_PUSH_MESSAGE_IND == GetActiveScreenId())
    {
        DeleteNHistory(1);
    }

    if (0 == brw_unread_msg_count)
    {
        DisplayIdleScreen();
        return;
    }

    if (brw_unread_msg_count < 10)
    {
        sprintf(buf, "%01d", brw_unread_msg_count);
    }
    else
    {
        sprintf(buf, "%02d", brw_unread_msg_count);
    }

    mmi_asc_to_ucs2(pOutBuffer, buf);
    mmi_ucs2cpy((S8*) message_string, pOutBuffer);
    mmi_ucs2cat((S8*) message_string, " ");
    mmi_ucs2cat((S8*) message_string, GetString(STR_ID_BRW_SERVICE_MESSAGE_RCVD));

    EntryNewScreen(SCR_ID_BRW_NEW_PUSH_MESSAGE_IND, NULL, mmi_brw_new_push_msg_ind_on_idlescreen, NULL);
    ShowStatusIcon(STATUS_ICON_WAP);

    if (0 == g_keylock_context.gKeyPadLockFlag)
    {
        /*
         * ShowCategory154Screen(
         * 0,
         * 0,
         * STR_ID_BRW_READ,
         * IMG_GLOBAL_YES,
         * STR_GLOBAL_BACK,
         * IMG_GLOBAL_BACK,
         * (PU8) message_string,
         * 0,
         * IMG_NEW_MESSAGE_NOTIFICATION_MSG,
         * NULL);
         */

        /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */
        ShowCategory66Screen(
            0,
            0,
            STR_ID_BRW_READ,
            IMG_GLOBAL_YES,
            STR_GLOBAL_BACK,
            IMG_GLOBAL_BACK,
            (PU8) message_string,
            IMG_NEW_MESSAGE_NOTIFICATION_MSG,
            NULL);

        g_mmi_brw_cntx.push_msg_rcvd_flag = MMI_FALSE;

        if (1 == brw_unread_msg_count)
        {
            SetLeftSoftkeyFunction(mmi_brw_read_arrived_push_message, KEY_EVENT_UP);
        }
        else
        {
            SetLeftSoftkeyFunction(mmi_brw_entry_service_inbox, KEY_EVENT_UP);
        }

        SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    }
    else    /* Keypad is locked */
    {
        extern void EntryScrAfterPessingRSK(void);

#if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__)
        extern void EntryScrKeyPadLockOnPessingAnyKey(void);
#endif

        /*
         * ShowCategory154Screen(
         * 0,
         * 0,
         * g_keylock_context.KeyLockLSKStringID,
         * g_keylock_context.KeyLockLSKIconID,
         * g_keylock_context.KeyLockRSKStringID,
         * g_keylock_context.KeyLockRSKIconID,
         * (PU8) message_string,
         * 0,
         * IMG_NEW_MESSAGE_NOTIFICATION_MSG,
         * NULL);
         */
        /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */
        ShowCategory66Screen(
            0,
            0,
            g_keylock_context.KeyLockLSKStringID,
            g_keylock_context.KeyLockLSKIconID,
            g_keylock_context.KeyLockRSKStringID,
            g_keylock_context.KeyLockRSKIconID,
            (PU8) message_string,
            IMG_NEW_MESSAGE_NOTIFICATION_MSG,
            NULL);

#if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__)
        SetGroupKeyHandler(
            EntryScrKeyPadLockOnPessingAnyKey,
            (PU16) PresentAllKeys,
            (U8) TOTAL_KEYS,
            (U16) KEY_EVENT_DOWN);
#endif /* defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) */

#ifdef __MMI_TOUCH_SCREEN__

#ifdef __MMI_KEYPAD_LOCK_PROMPT_TEXT__
#ifdef __MMI_KEYPAD_LOCK_PATTERN_1__
        SetRightSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN);
#endif
#ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
        SetLeftSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN);
#endif
#else /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */
        ClearKeyHandler(KEY_LSK, KEY_EVENT_DOWN);
        ClearKeyHandler(KEY_LSK, KEY_EVENT_UP);
        ClearKeyHandler(KEY_RSK, KEY_EVENT_DOWN);
        ClearKeyHandler(KEY_RSK, KEY_EVENT_UP);
#endif /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */
        SetKeyHandler(EntryScrAfterPessingRSK, KEY_SEND, KEY_EVENT_DOWN);

#else /* __MMI_TOUCH_SCREEN__ */

#ifdef __MMI_KEYPAD_LOCK_PATTERN_1__
        SetRightSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN);
#endif
#ifdef __MMI_KEYPAD_LOCK_PATTERN_2__
        SetLeftSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN);
#endif

#endif /* __MMI_TOUCH_SCREEN__ */

        ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
#ifdef __MMI_TOUCH_SCREEN__
        mmi_idle_pen_block();
#endif
    }
}
Exemplo n.º 18
0
static void avk_framework_entry_manual_scr_ext(mmi_scrn_essential_struct* data)
{
    MMI_BOOL enter_ret;
    U8 *guiBuffer;
    avk_manual_param* param;
    WCHAR name_buf[256];
    
    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/  
    param = (avk_manual_param*)data->user_data;
    
    enter_ret = mmi_frm_scrn_enter(GRP_ID_AVK, data->scrn_id, 
                    (FuncPtr)NULL, (FuncPtr)avk_framework_entry_manual_scr_ext, MMI_FRM_FULL_SCRN);

    if (enter_ret == MMI_FALSE)
    {
        return;
    }

    guiBuffer = mmi_frm_scrn_get_active_gui_buf();    
    
    mmi_frm_scrn_set_leave_proc(GRP_ID_AVK, data->scrn_id, avk_framework_leave_manual_scr);

    g_avk_framework_ctx.leftkey_handle = param->leftkey_handle;
    g_avk_framework_ctx.rightkey_handle = param->rightkey_handle;

    mmi_asc_to_ucs2((CHAR *)name_buf,(CHAR *)g_avk_framework_ctx.current_case->test_name);
    
    if (AVK_FRAMEWORK_MANUAL_TIPS_SCR == param->type) 
    {
        ShowCategory79Screen((UI_string_type)name_buf,
    						0,
    						(UI_string_type)L"OK",
                            0,
                            (UI_string_type)L"",
                            0,
                            MMI_TRUE,
                            MMI_TRUE,
                            (UI_buffer_type)param->content,
                            2*mmi_wcslen((WCHAR*)param->content)+2,
                            guiBuffer);

		
/*        ShowCategory366Screen((UI_string_type)name_buf,
                            0,
                            (UI_string_type)L"OK",
                            0,
                            (UI_string_type)L"",
                            0,
                            (UI_string_type)param->content,
                            0,
                            guiBuffer);*/

        SETLEFTKEY(avk_framework_leftkey_handle);
    }
    else if (AVK_FRAMEWORK_MANUAL_PASS_FAIL_SCR == param->type)
    {
    	ShowCategory79Screen((UI_string_type)name_buf,
    						0,
    						(UI_string_type)L"Pass",
                            0,
                            (UI_string_type)L"Fail",
                            0,
                            MMI_TRUE,
                            MMI_TRUE,
                            (UI_buffer_type)param->content,
                            2*mmi_wcslen((WCHAR*)param->content)+2,
                            guiBuffer);

 /*       ShowCategory366Screen((UI_string_type)name_buf,
                            0,
                            (UI_string_type)L"Pass",
                            0,
                            (UI_string_type)L"Fail",
                            0,
                            (UI_string_type)param->content,
                            0,
                            guiBuffer);*/
        
        SETLEFTKEY(avk_framework_pass);
        SETRIGHTKEY(avk_framework_fail);                            
    }
}
Exemplo n.º 19
0
/*****************************************************************************
 * FUNCTION
 *  csb_frm_select_folder_callback
 * DESCRIPTION
 *
 * PARAMETERS
 *  U32			cat_ID
 * RETURNS
 *  void
 *****************************************************************************/
void csb_frm_select_folder_callback(void *fullpath, int is_short)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
	U8	csb_drive_phone_unicode[10];
	U8	csb_drive_card_unicode[10];
	U8  csb_default_folder_unicode[10];
	U8  temp_ascii[5];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    UI_UNUSED_PARAMETER(is_short);

	sprintf((S8*)temp_ascii, "%c%s", MMI_PUBLIC_DRV, ":\\");
	mmi_asc_to_ucs2((PS8) csb_drive_phone_unicode, (PS8) temp_ascii);

	
	sprintf((S8*)temp_ascii, "%c%s", MMI_CARD_DRV, ":\\");
	mmi_asc_to_ucs2((PS8) csb_drive_card_unicode, (PS8) temp_ascii);

	mmi_asc_to_ucs2((PS8) csb_default_folder_unicode, (PS8) "CSB\\");


	/* If the file path returned by FileManager is longer than MAX, show error popup */
	if(fullpath)
	{
	if((mmi_ucs2strlen((char*) fullpath)) > MAX_CSB_PATH_LENGTH)
	{
		DisplayPopup((PU8) GetString(STR_ID_CSB_FILE_PATH_TOO_LONG),
				IMG_GLOBAL_ERROR, 
				1, 
				CSB_NOTIFY_DURATION, 
				0);
	}
		else if(!(mmi_ucs2cmp((PS8) fullpath, (PS8) csb_drive_phone_unicode)))
	{

	/* Store the path returned by CallBack in the Global variable */
		mmi_ucs2cpy((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8)fullpath);

			mmi_ucs2cat((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8) csb_default_folder_unicode);

			/* Write the updated value in NVRAM */
			csb_frm_write_in_nvram();

			DisplayPopup((PU8) GetString(STR_GLOBAL_DONE),
					IMG_GLOBAL_ACTIVATED, 
					1, 
					CSB_NOTIFY_DURATION, 
					0);
		}
		else if(!(mmi_ucs2cmp((PS8) fullpath, (PS8) csb_drive_card_unicode)))
		{

			/* Store the path returned by CallBack in the Global variable */
			mmi_ucs2cpy((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8)fullpath);
		
			mmi_ucs2cat((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8) csb_default_folder_unicode);

			/* Write the updated value in NVRAM */
			csb_frm_write_in_nvram();

			DisplayPopup((PU8) GetString(STR_GLOBAL_DONE),
					IMG_GLOBAL_ACTIVATED, 
					1, 
					CSB_NOTIFY_DURATION, 
					0);
		}
		else
		{
			/* Store the path returned by CallBack in the Global variable */
			mmi_ucs2cpy((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8)fullpath);
		
		/* Write the updated value in NVRAM */
		csb_frm_write_in_nvram();

		DisplayPopup((PU8) GetString(STR_GLOBAL_DONE),
				IMG_GLOBAL_ACTIVATED, 
				1, 
				CSB_NOTIFY_DURATION, 
				0);
	}
	}
	else
	{
		GoBackHistory();
	}
	DeleteUptoScrID(SCR_ID_CSB_TESTTOOL_SCR_ID);
}
Exemplo n.º 20
0
/*****************************************************************************
 * FUNCTION
 *  mmi_netset_show_user_ctrl_plmn_list
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_netset_show_user_ctrl_plmn_list(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    PU8 guiBuffer;
    U8 *PlmnListHint[MAX_SUB_MENUS];
    PU8 nStrItemList[MAX_USER_CTRL_PLMN];
    U8 i;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(SCR_ID_NETSET_USER_CTRL_PLMN_LIST, NULL, mmi_netset_show_user_ctrl_plmn_list, NULL);

    guiBuffer = GetCurrGuiBuffer(SCR_ID_NETSET_USER_CTRL_PLMN_LIST);

    RegisterHighlightHandler(mmi_netset_highlight_user_ctrl_plmn_list_hdlr);
    if (!gUserCtrlPlmnList.PlmnListSize)
    {
        /* no record */
        nStrItemList[0] = (U8*) GetString(STR_GLOBAL_EMPTY_LIST);
        ShowCategory6Screen(
            STR_ID_NETSET_USER_CTRL_PLMN,
            MAIN_MENU_TITLE_SETTINGS_ICON,
            STR_GLOBAL_OPTIONS,
            IMG_GLOBAL_OPTIONS,
            STR_GLOBAL_BACK,
            IMG_GLOBAL_BACK,
            1,
            (U8 **) nStrItemList,
            NULL,
            0,
            guiBuffer);
    }
    else
    {
        for (i = 0; i < MAX_USER_CTRL_PLMN; i++)
        {
            nStrItemList[i] = NULL;
        }

        for (i = 0; i < gUserCtrlPlmnList.PlmnListSize; i++)
        {
            mmi_asc_to_ucs2(
                (S8*) gUserCtrlPlmnList.tmpPlmnListData[i],
                (S8*) gUserCtrlPlmnList.PrefPLMN[i] + sizeof(U32));
            nStrItemList[i] = gUserCtrlPlmnList.tmpPlmnListData[i];
        }

        mmi_netset_construct_user_ctrl_plmn_hint(PlmnListHint);
        ShowCategory6Screen(
            STR_ID_NETSET_USER_CTRL_PLMN,
            MAIN_MENU_TITLE_SETTINGS_ICON,
            STR_GLOBAL_OPTIONS,
            IMG_GLOBAL_OPTIONS,
            STR_GLOBAL_BACK,
            IMG_GLOBAL_BACK,
            gUserCtrlPlmnList.PlmnListSize,
            (U8 **) nStrItemList,
            PlmnListHint,
            0,
            guiBuffer);
    }

    SetLeftSoftkeyFunction(mmi_netset_entry_user_ctrl_plmn_options, KEY_EVENT_UP);
    SetKeyHandler(mmi_netset_entry_user_ctrl_plmn_options, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
    SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
    SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
}